Compare commits

..

1118 Commits

Author SHA1 Message Date
catlog22
dfe153778c feat: Implement Cross-CLI Sync Panel for MCP servers
- Added CrossCliSyncPanel component for synchronizing MCP servers between Claude and Codex.
- Implemented server selection, copy operations, and result handling.
- Added tests for path mapping on Windows drives.
- Created E2E tests for ask_question Answer Broker functionality.
- Introduced MCP Tools Test Script for validating modified read_file and edit_file tools.
- Updated path_mapper to ensure correct drive formatting on Windows.
- Added .gitignore for ace-tool directory.
2026-02-08 23:19:19 +08:00
catlog22
b9b2932f50 Add tests and implement functionality for staged cascade search and LSP expansion
- Introduced a new JSON file for verbose output of the Codex Lens search results.
- Added unit tests for binary search functionality in `test_stage1_binary_search_uses_chunk_lines.py`.
- Implemented regression tests for staged cascade Stage 2 expansion depth in `test_staged_cascade_lsp_depth.py`.
- Created unit tests for staged cascade Stage 2 realtime LSP graph expansion in `test_staged_cascade_realtime_lsp.py`.
- Enhanced the ChainSearchEngine to respect configuration settings for staged LSP depth and improve search accuracy.
2026-02-08 21:54:42 +08:00
catlog22
166211dcd4 feat: add Unsplash search hook and API proxy routes
- Implemented `useUnsplashSearch` hook for searching Unsplash photos with debounce.
- Created Unsplash API client functions for searching photos and triggering downloads.
- Added proxy routes for Unsplash API to handle search requests and background image uploads.
- Introduced accessibility utilities for WCAG compliance checks and motion preference management.
- Developed theme sharing module for encoding and decoding theme configurations as base64url strings.
2026-02-08 20:01:28 +08:00
catlog22
87daccdc48 feat: 添加版本检查功能及 Header 布局修复
- SettingsPage 新增 VersionCheckSection(自动/手动检查更新)
- 添加版本检查相关中英文 i18n 翻译
- 修复 Header 历史链接的 flex 布局对齐
2026-02-08 15:21:32 +08:00
catlog22
f27e52a7a6 feat: 新增 EnhancedSelect 组件,为 A2UI Dropdown 添加 Combobox 模式
- 创建 enhanced-select 组件(搜索、分组、描述、键盘导航、Glassmorphism 样式)
- 扩展 DropdownComponentSchema 支持 searchable/clearable/size/label/error 等字段
- A2UIDropdown 渲染器自动检测增强特性,按需切换标准 Select 与 Combobox 模式
- 所有新字段 optional,完全向后兼容
2026-02-08 15:21:22 +08:00
catlog22
cafc6d06fe fix: 更新帮助页面链接以指向正确的文档路径 2026-02-08 13:59:06 +08:00
catlog22
0a04660c80 Refactor code structure for improved readability and maintainability 2026-02-08 13:47:59 +08:00
catlog22
54c3234d84 fix: 为所有 skill 的 .workflow/ 路径添加 projectRoot 前缀
从子目录执行 skill 时,相对路径 .workflow/ 会导致产物落到错误位置。
通过 git rev-parse --show-toplevel || pwd 检测项目根目录,
所有 .workflow/ 路径引用统一加上 {projectRoot} 前缀确保路径正确。

涉及 72 个文件,覆盖 20+ 个 skill。
2026-02-08 13:46:48 +08:00
catlog22
71faaf43a8 refactor: 移除 SPLADE 和 hybrid_cascade,精简搜索架构
删除 SPLADE 稀疏神经搜索后端和 hybrid_cascade 策略,
将搜索架构从 6 种后端简化为 4 种(FTS Exact/Fuzzy, Binary Vector, Dense Vector, LSP)。

主要变更:
- 删除 splade_encoder.py, splade_index.py, migration_009 等 4 个文件
- 移除 config.py 中 SPLADE 相关配置(enable_splade, splade_model 等)
- DEFAULT_WEIGHTS 改为 FTS 权重 {exact:0.25, fuzzy:0.1, vector:0.5, lsp:0.15}
- 删除 hybrid_cascade_search(),所有 cascade fallback 改为 self.search()
- API fusion_strategy='hybrid' 向后兼容映射到 binary_rerank
- 删除 CLI index_splade/splade_status 命令和 --method splade
- 更新测试、基准测试和文档
2026-02-08 12:07:41 +08:00
catlog22
72d2ae750b fix: 修正 INSTALL_CN.md 外部 AI 工具说明,与 ccw 源码保持一致
- 配置文件路径从不存在的 tool-control.yaml 改为实际的 cli-tools.json
- 工具列表从 3 个补全为 5 个(新增 Claude Code、OpenCode)
- 修正工具描述、npm 包名和 GitHub 链接
- 配置示例从 YAML 改为 JSON 格式,匹配源码 DEFAULT_TOOLS_CONFIG
2026-02-08 10:32:03 +08:00
catlog22
3b14f98994 fix: 修正检查安装状态的路径变量,确保正确引用用户目录 2026-02-08 09:43:02 +08:00
catlog22
b22298d868 feat: 更新工具列表,支持 .ccw 目录的安装和升级,调整相关路径 2026-02-07 23:51:26 +08:00
catlog22
50570a9820 feat: 更新工作流路径至用户主目录,优化文件引用 2026-02-07 23:45:55 +08:00
catlog22
41cff28799 Refactor code structure for improved readability and maintainability 2026-02-07 23:44:22 +08:00
catlog22
80ae4baea8 feat: Refactor AppShell and Header components, enhance memory management UI, and align API endpoints
- Removed defaultCollapsed prop from AppShell and set sidebar to be collapsed by default.
- Updated Header component to remove mobile menu toggle and added a history entry button.
- Refactored ExplorationsSection to streamline data extraction and improve UI rendering.
- Added new messages for GitHub sync success and error handling in issues.
- Implemented View Memory Dialog for better memory content viewing and editing.
- Enhanced FlowToolbar to auto-create flows and improved save functionality.
- Conducted a frontend audit for API endpoint alignment with backend implementations.
2026-02-07 23:15:50 +08:00
catlog22
82ed5054f5 feat: 添加 Lite Execute 阶段,支持多种输入模式和执行流程 2026-02-07 23:08:44 +08:00
catlog22
13c4dd0032 feat: enhance issue management with edit functionality and UI improvements
- Added Edit Issue dialog to allow users to modify existing issues with fields for title, context, priority, and status.
- Integrated form validation and state management for the edit dialog.
- Updated the IssueManagerPage to handle opening and closing of the edit dialog, as well as submitting updates.
- Improved UI components in SolutionDrawer and ExplorationSection for better user experience.
- Refactored file path input with a browse dialog for selecting files and directories in SettingsPage.
- Adjusted layout and styling in LeftSidebar and OrchestratorPage for better responsiveness and usability.
- Updated localization files to include new strings for the edit dialog and task management.
2026-02-07 22:50:36 +08:00
catlog22
dc9a1a1efb feat: 增加对非数组值的处理,优化数组、文件和标签渲染器 2026-02-07 22:26:11 +08:00
catlog22
ece02ab32a Add coverage prettification and sorting functionality
- Introduced `prettify.css` for syntax highlighting in coverage reports.
- Added `prettify.js` to handle code formatting and highlighting.
- Included `sort-arrow-sprite.png` for sort indicators in the coverage table.
- Implemented `sorter.js` to enable sorting and filtering of coverage summary tables.
- Added a search box for filtering table rows based on user input.
2026-02-07 22:21:05 +08:00
catlog22
6073627ff2 feat(cli-endpoints): add create, update, and delete functionality for CLI endpoints
- Implemented `useCreateCliEndpoint`, `useUpdateCliEndpoint`, and `useDeleteCliEndpoint` hooks for managing CLI endpoints.
- Added `CliEndpointFormDialog` component for creating and editing CLI endpoints with validation.
- Updated translations for CLI hooks and manager to include new fields and messages.
- Refactored `CcwToolsMcpCard` to simplify enabling and disabling tools.
- Adjusted `SkillCreateDialog` to display paths based on CLI type.
2026-02-07 21:56:08 +08:00
catlog22
678be8d41f feat: add codex skills support and enhance system status UI
- Introduced new query keys for codex skills and their list.
- Updated English and Chinese locale files for system status messages.
- Enhanced the SettingsPage to display installation details and upgrade options.
- Integrated CLI mode toggle in SkillsManagerPage for better skill management.
- Modified skills routes to handle CLI type for skill operations and configurations.
2026-02-07 21:45:12 +08:00
catlog22
2094c1085b feat: enhance MCP server management and system settings
- Added functionality to save MCP server configurations as templates in the MCP Manager.
- Implemented new hooks for managing system settings including Chinese response, Windows platform, and Codex CLI enhancements.
- Updated API calls to support fetching and toggling system settings.
- Introduced UI components for displaying and managing response language settings and system status.
- Enhanced error handling and notifications for server deletion and template saving actions.
- Updated localization files for new settings and descriptions in English and Chinese.
2026-02-07 21:17:18 +08:00
catlog22
d29527ae16 fix(tests): 更新技能管理测试以直接导航到技能页面并优化监控清理逻辑 2026-02-07 20:10:17 +08:00
catlog22
d43696d756 feat: Implement phases 6 to 9 of the review cycle fix process, including discovery, batching, parallel planning, execution, and completion
- Added Phase 6: Fix Discovery & Batching with intelligent grouping and batching of findings.
- Added Phase 7: Fix Parallel Planning to launch planning agents for concurrent analysis and aggregation of partial plans.
- Added Phase 8: Fix Execution for stage-based execution of fixes with conservative test verification.
- Added Phase 9: Fix Completion to aggregate results, generate summary reports, and handle session completion.
- Introduced new frontend components: ResizeHandle for draggable resizing of sidebar panels and useResizablePanel hook for managing panel sizes with localStorage persistence.
- Added PowerShell script for checking TypeScript errors in source code, excluding test files.
2026-02-07 19:28:33 +08:00
catlog22
ba5f4eba84 feat: Implement dynamic test-fix execution phase with adaptive task generation
- Added Phase 2: Test-Cycle Execution documentation outlining the process for dynamic test-fix execution, including agent roles, core responsibilities, intelligent strategy engine, and progressive testing.
- Introduced new PowerShell scripts for analyzing TypeScript errors, focusing on error categorization and reporting.
- Created end-to-end tests for the Help Page, ensuring content visibility, documentation navigation, internationalization support, and accessibility compliance.
2026-02-07 17:01:30 +08:00
catlog22
4ce4419ea6 Remove deprecated issue management skills: issue-discover, issue-new, issue-plan, and issue-queue. These skills have been deleted to streamline the codebase and improve maintainability. 2026-02-07 15:28:31 +08:00
catlog22
514f97956e fix(skill): 更新技能名称为 workflow-lite-plan-execute,修正相关文档引用 2026-02-07 12:05:12 +08:00
catlog22
7d6cbd280c feat(execution): add Phase 4: Execution with agent orchestration, lazy loading, and auto-commit features 2026-02-07 11:57:45 +08:00
catlog22
c806d7c3a2 Remove Phase 3: Lite Fix documentation and add regression test for CSRF token fallback mechanism 2026-02-07 11:12:10 +08:00
catlog22
92b0d175a7 Refactor API calls to use csrfFetch for enhanced security across multiple views, including loop-monitor, mcp-manager, memory, prompt-history, rules-manager, session-detail, and skills-manager. Additionally, add Phase 1 and Phase 2 documentation for session initialization and orchestration loop in the ccw-loop-b skill. 2026-02-07 10:54:12 +08:00
catlog22
f7dfbc0512 restore: 恢复 ccw-loop-b skill 2026-02-07 00:02:45 +08:00
catlog22
a4ea817a5f Add orchestration loop phase and workflow execution skill
- Implemented Phase 2: Orchestration Loop for CCW Loop, including executor agent spawning, main loop execution, and iteration management.
- Introduced helper functions for action result parsing and user interaction.
- Created new skill: workflow-execute, coordinating agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking.
- Defined execution flow, key design principles, and error handling strategies for the workflow execution process.
2026-02-06 23:58:18 +08:00
catlog22
5b48bcff64 Add end-to-end tests for Graph Explorer, History, Orchestrator, and Project features
- Implemented E2E tests for code relationship visualization in Graph Explorer.
- Added tests for archived session management in History, including search, filter, restore, and delete functionalities.
- Created tests for workflow orchestration in Orchestrator, covering node creation, connection, deletion, and workflow management.
- Developed tests for project statistics and timeline visualization in Project, including error handling and internationalization checks.
2026-02-06 23:45:33 +08:00
catlog22
62a1c9ab21 feat: 集成 NativeSessionPanel 到 HistoryPage,支持查看原生CLI会话
在历史记录页面中集成 NativeSessionPanel 组件,用户可通过
ConversationCard 的下拉菜单查看 Gemini/Codex/Qwen 原生会话详情。
2026-02-06 23:10:22 +08:00
catlog22
3d862e6ed8 feat: 添加更好的 SQLite3 模块加载和错误处理,更新相关组件以支持项目路径 2026-02-06 23:07:56 +08:00
catlog22
5cdbb43b3b fix: gitignore 规则过宽导致 locales/settings.json 未被追踪
根目录 .gitignore 中 settings.json 规则缺少路径前缀,
匹配了所有子目录下的同名文件,导致克隆仓库后
locales/en/settings.json 和 locales/zh/settings.json 缺失,
vite 构建报错。改为 /settings.json 限制为仅忽略根目录文件。
2026-02-06 23:05:55 +08:00
catlog22
0c0e442fe6 feat: add Chinese localization and new assets for CCW documentation
- Created LICENSE.txt for JavaScript assets including NProgress and React libraries.
- Added runtime JavaScript file for main functionality.
- Introduced new favicon and logo SVG assets for branding.
- Added comprehensive FAQ section in Chinese, covering CCW features, installation, workflows, AI model support, and troubleshooting.
2026-02-06 22:39:35 +08:00
catlog22
6a5c17e42e feat: add Chinese localization and new assets for CCW documentation
- Created LICENSE.txt for JavaScript assets including NProgress and React libraries.
- Added runtime JavaScript file for main functionality.
- Introduced new favicon and logo SVG assets for branding.
- Added comprehensive FAQ section in Chinese, covering CCW features, installation, workflows, AI model support, and troubleshooting.
2026-02-06 21:56:02 +08:00
catlog22
9b1655be9b Add phases for issue resolution: From Brainstorm and Form Execution Queue
- Implement Phase 3: From Brainstorm to convert brainstorm session output into executable issues and solutions.
- Implement Phase 4: Form Execution Queue to analyze bound solutions, resolve conflicts, and create an ordered execution queue.
- Introduce new data structures for Issue and Solution schemas.
- Enhance CLI commands for issue creation and queue management.
- Add error handling and quality checklist for queue formation.
2026-02-06 14:23:13 +08:00
catlog22
248daa1d00 feat: 添加左侧面板和节点库组件,整合模板和节点功能
feat: 实现可折叠的模板面板,支持搜索和安装模板
feat: 更新流程工具栏,增加导入模板和模拟运行功能
feat: 增强属性面板,支持标签和产物管理
feat: 优化提示模板节点,增加执行状态和阶段显示
2026-02-06 11:56:48 +08:00
catlog22
c8f9bc7994 feat: 添加左侧面板选项卡状态管理,更新流程节点数据结构 2026-02-06 11:38:20 +08:00
catlog22
a9b9ec48f1 feat: add license files for JavaScript assets and implement DocItem component
- Added LICENSE.txt file for JavaScript assets in the build directory, including licenses for NProgress and React libraries.
- Introduced a new runtime JavaScript file for handling module loading.
- Created a new DocItem component to manage document rendering and metadata handling in the Docusaurus theme.
- Implemented tests for the docs proxy server to ensure proper routing to the configured docsPort.
2026-02-06 10:25:24 +08:00
catlog22
f9188eb0b6 Add Chinese documentation for CLI commands and workflows 2026-02-05 23:30:06 +08:00
catlog22
05ad8110f4 Add runtime JavaScript file for Chinese documentation build 2026-02-05 21:50:52 +08:00
catlog22
4258a77dd2 Add license files and new runtime JavaScript bundle for Chinese documentation site 2026-02-05 20:57:57 +08:00
catlog22
9fc2c876f7 Add Phase 4: Task Generation documentation and execution process
- Introduced comprehensive guidelines for generating implementation plan documents (IMPL_PLAN.md, task JSONs, TODO_LIST.md) using the action-planning-agent.
- Defined auto mode for user configuration with default settings.
- Outlined core philosophy emphasizing planning only, agent-driven document generation, and memory-first context loading.
- Detailed execution process divided into phases: User Configuration, Context Preparation, Single Agent Planning, N Parallel Planning, and Integration.
- Included lifecycle management for user configuration and agent interactions.
- Specified document generation lifecycle with clear expectations for outputs and quality standards.
2026-02-05 20:50:21 +08:00
catlog22
01459a34a5 Add tests for CLI command generation and model alias resolution
- Implement `test-cli-command-gen.js` to verify the logic of `buildCliCommand` function.
- Create `test-e2e-model-alias.js` for end-to-end testing of model alias resolution in `ccw cli`.
- Add `test-model-alias.js` to test model alias resolution for different models.
- Introduce `test-model-alias.txt` for prompt testing with model alias.
- Develop `test-update-claude-command.js` to test command generation for `update_module_claude`.
- Create a test file in `test-update-claude/src` for future tests.
2026-02-05 20:17:10 +08:00
catlog22
6576886457 feat: 支持模型别名(PRIMARY_MODEL, SECONDARY_MODEL)并更新CLI命令构建逻辑 2026-02-05 20:09:04 +08:00
catlog22
47c192f584 Add orchestrator design, phase file generation, and validation processes
- Implement Phase 2: Orchestrator Design with detailed steps for generating SKILL.md
- Introduce Phase 3: Phase Files Design to create phase files with content fidelity
- Establish Phase 4: Validation & Integration to ensure structural completeness and reference integrity
- Include comprehensive validation checks for content quality and data flow consistency
- Enhance documentation with clear objectives and critical rules for each phase
2026-02-05 19:29:45 +08:00
catlog22
eac1bb81c8 feat: Add unified-execute-parallel, unified-execute-with-file, and worktree-merge workflows
- Implemented unified-execute-parallel for executing tasks in isolated Git worktrees with parallel execution capabilities.
- Developed unified-execute-with-file for universal task execution from various planning outputs with progress tracking.
- Created worktree-merge to handle merging of completed worktrees back to the main branch, including dependency management and conflict detection.
- Enhanced documentation for each workflow, detailing core functionalities, implementation phases, and configuration options.
2026-02-05 18:44:00 +08:00
catlog22
1480873008 feat: Implement parallel collaborative planning workflow with Plan Note
- Updated collaborative planning prompt to support parallel task generation with subagents.
- Enhanced workflow to include explicit lifecycle management for agents and conflict detection.
- Revised output structure to accommodate parallel planning results.
- Added new LocaleDropdownNavbarItem component for language selection in the documentation site.
- Introduced styles for the language icon in the dropdown.
- Modified issue execution process to streamline commit messages and report completion with full solution metadata.
2026-02-05 18:24:35 +08:00
catlog22
a59baf2473 feat: 移除清理命令参数中的目标和确认选项,简化使用方式 2026-02-05 17:37:03 +08:00
catlog22
5cfeb59124 feat: add configuration backup, sync, and version checker services
- Implemented ConfigBackupService for backing up local configuration files.
- Added ConfigSyncService to download configuration files from GitHub with remote-first conflict resolution.
- Created VersionChecker to check application version against the latest GitHub release with caching.
- Introduced security validation utilities for input validation to prevent common vulnerabilities.
- Developed utility functions to start and stop Docusaurus documentation server.
2026-02-05 17:32:31 +08:00
catlog22
834951a08d feat(flow-coordinator): add slashCommand/slashArgs support for unified workflow
- Add buildNodeInstruction() to construct instructions from slashCommand field
- Support slashArgs with {{variable}} interpolation
- Append additional instruction as context when slashCommand is set
- Update unified-workflow-spec.md with slashCommand/slashArgs documentation

This enables frontend orchestrator JSON to be directly consumed by
flow-coordinator skill in Claude client.
2026-02-05 15:33:06 +08:00
catlog22
e555355a71 feat: 更新依赖项,提升 TypeScript 和 Playwright 测试库版本,支持 Node.js 18+ 2026-02-05 14:45:57 +08:00
catlog22
23f752b975 feat: Implement slash command functionality in the orchestrator
- Refactored NodePalette to remove unused templates and streamline the UI.
- Enhanced PropertyPanel to support slash commands with input fields for command name and arguments.
- Introduced TagEditor for inline variable editing and custom template creation.
- Updated PromptTemplateNode to display slash command badges and instructions.
- Modified flow types to include slashCommand and slashArgs for structured execution.
- Adjusted flow executor to construct instructions based on slash command fields.
2026-02-05 14:29:04 +08:00
catlog22
a19ef94444 feat: add quick template functionality to NodePalette and enhance node creation experience 2026-02-05 09:57:20 +08:00
catlog22
0664937b98 feat: add gradient effects settings and enhance theme customization options 2026-02-04 23:24:16 +08:00
catlog22
369b470969 feat: enhance CoordinatorEmptyState and ThemeSelector with gradient utilities and improved layout 2026-02-04 23:06:00 +08:00
catlog22
de989aa038 feat: unify CLI output handling and enhance theme variables
- Updated `CliStreamMonitorNew`, `CliStreamMonitorLegacy`, and `CliViewerPage` components to prioritize `unitContent` from payloads, falling back to `data` when necessary.
- Enhanced `colorGenerator` to include legacy variables for compatibility with shadcn/ui.
- Refactored orchestrator index to unify node exports under a single module.
- Improved `appStore` to clear both new and legacy CSS variables when applying themes.
- Added new options to CLI execution for raw and final output modes, improving programmatic output handling.
- Enhanced `cli-output-converter` to normalize cumulative delta frames and avoid duplication in streaming outputs.
- Introduced a new unified workflow specification for prompt template-based workflows, replacing the previous multi-type node system.
- Added tests for CLI final output handling and streaming output converter to ensure correct behavior in various scenarios.
2026-02-04 22:57:41 +08:00
catlog22
4ee165119b refactor: unify node types into a single PromptTemplate model
- Removed individual node components (SlashCommandNode, FileOperationNode, etc.) and replaced them with a unified PromptTemplateNode.
- Updated flow types and interfaces to reflect the new single node type system.
- Refactored flow execution logic to handle the new unified model, simplifying node execution and context handling.
- Adjusted UI components to support the new PromptTemplateNode, including instruction display and context references.
- Cleaned up legacy code related to removed node types and ensured compatibility with the new structure.
2026-02-04 22:22:27 +08:00
catlog22
113c14970f feat: add CommandCombobox component for selecting slash commands and update PropertyPanel to use it
refactor: remove unused liteTasks localization from common.json and zh/common.json
refactor: consolidate liteTasks localization into lite-tasks.json and zh/lite-tasks.json
refactor: simplify MultiCliTab type in LiteTaskDetailPage
refactor: enhance task display in LiteTasksPage with additional metadata
2026-02-04 19:24:31 +08:00
catlog22
7b2ac46760 refactor: streamline store access in useWebSocket by consolidating state retrieval into getStoreState function 2026-02-04 18:00:06 +08:00
catlog22
346c87a706 refactor: optimize useWebSocket hook by consolidating store references and improving handler stability 2026-02-04 17:29:30 +08:00
catlog22
e260a3f77b feat: enhance theme customization and UI components
- Implemented a new color generation module to create CSS variables based on a single hue value, supporting both light and dark modes.
- Added unit tests for the color generation logic to ensure accuracy and robustness.
- Replaced dropdown location filter with tab navigation in RulesManagerPage and SkillsManagerPage for improved UX.
- Updated app store to manage custom theme hues and states, allowing for dynamic theme adjustments.
- Sanitized notification content before persisting to localStorage to prevent sensitive data exposure.
- Refactored memory retrieval logic to handle archived status more flexibly.
- Improved Tailwind CSS configuration with new gradient utilities and animations.
- Minor adjustments to SettingsPage layout for better visual consistency.
2026-02-04 17:20:40 +08:00
catlog22
88616224e0 refactor: remove redundant usage guidelines from workflow documentation 2026-02-04 17:18:56 +08:00
catlog22
6e6c2b9e09 fix: add mountedRef guard to useWebSocket to prevent setState on unmounted component
- Add mountedRef to track component mount state in useWebSocket hook
- Guard handleMessage callback to return early if component is unmounted
- Set mountedRef.current = false in useEffect cleanup function

This addresses finding perf-011 about potential memory leaks from setState
on unmounted components. The mounted ref provides a defensive check to
ensure no state updates occur after component unmount.

Related: code review group G03 - Critical Memory Leaks
2026-02-04 17:05:20 +08:00
catlog22
2bfce150ec feat: enhance RecommendedMcpWizard with icon mapping; improve ExecutionTab accessibility; refine NavGroup path matching; update fetchSkills to include enabled status; add loading and error messages to localization 2026-02-04 16:38:18 +08:00
catlog22
ac95ee3161 feat: update CLI mode toggle for improved UI and functionality; refactor RecommendedMcpWizard API call; add new localization strings for installation wizard and tools 2026-02-04 15:26:36 +08:00
catlog22
8454ae4f41 feat: add quick install templates and index status to CLI hooks and home locales
feat: enhance MCP manager with interactive question feature and update locales

feat: implement tags and available models management in settings page

fix: improve process termination logic in stop command for React frontend

fix: update view command to default to 'js' frontend

feat: add Recommended MCP Wizard component for dynamic server configuration
2026-02-04 15:24:34 +08:00
catlog22
341331325c feat: Enhance A2UI with RadioGroup and Markdown support
- Added support for RadioGroup component in A2UI, allowing single selection from multiple options.
- Implemented Markdown parsing in A2UIPopupCard for better content rendering.
- Updated A2UIPopupCard to handle different question types and improved layout for multi-select and single-select questions.
- Introduced new utility functions for handling disabled items during installation.
- Enhanced installation process to restore previously disabled skills and commands.
- Updated notification store and related tests to accommodate new features.
- Adjusted Vite configuration for better development experience.
2026-02-04 13:45:47 +08:00
catlog22
1a05551d00 feat(a2ui): enhance A2UI notification handling and multi-select support 2026-02-04 11:11:55 +08:00
catlog22
c6093ef741 feat: add CLI Command Node and Prompt Node components for orchestrator
- Implemented CliCommandNode component for executing CLI tools with AI models.
- Implemented PromptNode component for constructing AI prompts with context.
- Added styling for mode and tool badges in both components.
- Enhanced user experience with command and argument previews, execution status, and error handling.

test: add comprehensive tests for ask_question tool

- Created direct test for ask_question tool execution.
- Developed end-to-end tests to validate ask_question tool integration with WebSocket and A2UI surfaces.
- Implemented simple and integrated WebSocket tests to ensure proper message handling and surface reception.
- Added tool registration test to verify ask_question tool is correctly registered.

chore: add WebSocket listener and simulation tests

- Added WebSocket listener for A2UI surfaces to facilitate testing.
- Implemented frontend simulation test to validate complete flow from backend to frontend.
- Created various test scripts to ensure robust testing of ask_question tool functionality.
2026-02-03 23:10:36 +08:00
catlog22
a806d70d9b refactor: remove lite-plan-c workflow and update orchestrator UI components
- Deleted the lite-plan-c workflow file to streamline the planning process.
- Updated orchestrator localization files to include new variable picker and multi-node selector messages.
- Modified PropertyPanel to support new execution modes and added output variable input fields.
- Enhanced SlashCommandNode to reflect changes in execution modes.
- Introduced MultiNodeSelector component for better node selection management.
- Added VariablePicker component for selecting variables with improved UX.
2026-02-03 21:24:34 +08:00
catlog22
9bb50a13fa feat(websocket): integrate A2UI message handling and answer callback registration 2026-02-03 21:18:19 +08:00
catlog22
bb4cd0529e feat(codex): add parallel execution workflows with worktree support
Add three new workflow commands for parallel development:

- collaborative-plan-parallel.md: Planning with execution group assignment
  - Supports automatic/balanced/manual group assignment strategies
  - Assigns codex instances and branch names per group
  - Detects cross-group conflicts and dependencies

- unified-execute-parallel.md: Worktree-based group execution
  - Executes tasks in isolated Git worktrees (.ccw/worktree/{group-id}/)
  - Enables true parallel execution across multiple codex instances
  - Simplified focus on execution only

- worktree-merge.md: Dependency-aware worktree merging
  - Merges completed worktrees in dependency order
  - Handles cross-group file conflicts
  - Optional worktree cleanup after merge

Key improvements:
- True parallel development via Git worktrees (vs branch switching)
- Clear separation of concerns (plan → execute → merge)
- Support for multi-codex coordination
2026-02-03 21:17:45 +08:00
catlog22
a8385e2ea5 feat: Enhance Project Overview and Review Session pages with improved UI and functionality
- Updated ProjectOverviewPage to enhance the guidelines section with better spacing, larger icons, and improved button styles.
- Refactored ReviewSessionPage to unify filter controls, improve selection actions, and enhance the findings list with a new layout.
- Added dimension tabs and severity filters to the SessionsPage for better navigation and filtering.
- Improved SessionDetailPage to utilize a mapping for status labels, enhancing internationalization support.
- Refactored TaskListTab to remove unused priority configuration code.
- Updated store types to better reflect session metadata structure.
- Added a temporary JSON file for future use.
2026-02-03 20:58:03 +08:00
catlog22
37ba849e75 feat: add CLI Viewer Page with multi-pane layout and state management
- Implemented the CliViewerPage component for displaying CLI outputs in a configurable multi-pane layout.
- Integrated Zustand for state management, allowing for dynamic layout changes and tab management.
- Added layout options: single, split horizontal, split vertical, and 2x2 grid.
- Created viewerStore for managing layout, panes, and tabs, including actions for adding/removing panes and tabs.
- Added CoordinatorPage barrel export for easier imports.
2026-02-03 17:28:26 +08:00
catlog22
b63e254f36 fix(frontend): fix button icon and text layout in help page
- Add inline-flex items-center to all button links for proper icon alignment
- Add flex-shrink-0 to all icons to prevent shrinking
- Change support buttons container to flex-wrap for better responsiveness
- Ensure icons and text stay on same line in all buttons
2026-02-03 15:14:15 +08:00
catlog22
86b1a15671 feat(frontend): optimize help page layout and add i18n support
- Add Chinese and English translations for help page
- Fix button overlapping issues with responsive layouts
- Improve icon and button positioning with flexbox
- Add proper spacing and breakpoints for mobile/tablet/desktop
- Make cards consistent with flexbox layout
- Ensure all buttons have proper whitespace-nowrap
- Use flex-shrink-0 for icons to prevent squashing
2026-02-03 15:07:14 +08:00
catlog22
39b80b3386 feat: initialize monorepo with package.json for CCW workflow platform 2026-02-03 14:42:20 +08:00
catlog22
5483a72e9f feat: add Accordion component for UI and Zustand store for coordinator management
- Implemented Accordion component using Radix UI for collapsible sections.
- Created Zustand store to manage coordinator execution state, command chains, logs, and interactive questions.
- Added validation tests for CLI settings type definitions, ensuring type safety and correct behavior of helper functions.
2026-02-03 10:02:40 +08:00
catlog22
bcb4af3ba0 feat(commands): add ccw-plan and ccw-test coordinators with arrow-style documentation
- Add ccw-plan.md: Planning coordinator with 10 modes (lite/multi-cli/full/plan-verify/replan + cli/issue/rapid-to-issue/brainstorm-with-file/analyze-with-file)
- Add ccw-test.md: Test coordinator with 4 modes (gen/fix/verify/tdd) and auto-iteration support
- Refactor ccw-debug.md: Convert JavaScript pseudocode to arrow instruction format for better readability
- Fix command format: Use /ccw* skill call syntax instead of ccw* across all command files

Key features:
- CLI integration for quick analysis and recommendations
- Issue workflow integration (rapid-to-issue bridge)
- With-File workflows for documented multi-CLI collaboration
- Consistent arrow-based flow diagrams across all coordinators
- TodoWrite tracking with mode-specific prefixes (CCWP/CCWT/CCWD)
- Dual tracking system (TodoWrite + status.json)
2026-02-02 21:41:56 +08:00
catlog22
545679eeb9 Refactor execution modes and CLI integration across agents
- Updated code-developer, tdd-developer, and test-fix-agent to streamline execution modes based on task.meta.execution_config.method.
- Removed legacy command handling and introduced CLI handoff for 'cli' execution method.
- Enhanced buildCliHandoffPrompt to include task JSON path and improved context handling.
- Updated task-generate-agent and task-generate-tdd to reflect new execution method mappings and removed command field from implementation_approach.
- Improved CLI settings validation in CliSettingsModal with format and length checks.
- Added localization for new CLI settings messages in English and Chinese.
- Enhanced GPU selector to use localized strings for GPU types.
- Introduced TypeScript LSP setup documentation for better user guidance.
2026-02-02 19:21:30 +08:00
catlog22
2305e7b8e7 feat(tests): add verification script for execution ID with output analysis 2026-02-02 11:55:12 +08:00
catlog22
48871f0d9e feat(tests): add CLI API response format tests and output format detection 2026-02-02 11:46:12 +08:00
catlog22
a54246a46f feat: add API settings page for managing providers, endpoints, cache, model pools, and CLI settings
feat: implement semantic install dialog for CodexLens with GPU mode selection
feat: add radio group component for GPU mode selection
feat: update navigation and localization for API settings and semantic install
2026-02-02 11:16:19 +08:00
catlog22
e4b627bc76 fix(hooks): fix EventGroup undefined component error
- Add Play icon import for SessionStart trigger type
- Add SessionStart case to getEventIcon function
- Add SessionStart case to getEventColor function with purple color
- Add default cases to both functions to prevent undefined returns

Fixes runtime error: 'Element type is invalid: expected a string or class/function but got: undefined' in EventGroup component
2026-02-02 10:56:45 +08:00
catlog22
392f89f62f fix(i18n): fix JSON structure and add missing Chinese translations for API Settings
- Fix duplicate validation key in common section
- Fix messages section nesting (should be sibling to common, not child)
- Add missing Chinese translations:
  - providers.showDisabled/hideDisabled/showAll
  - endpoints.showDisabled/showAll
  - common.showAll
2026-02-02 10:52:43 +08:00
catlog22
1beb98366b refactor(frontend): change API Settings from sidebar to horizontal tabs layout
Refactor ApiSettingsPage to use horizontal Tabs component like CodexLens page,
replacing the previous vertical sidebar navigation.

Changes:
- Replace Card-based sidebar with horizontal TabsList/TabsTrigger components
- Remove split-panel layout (sidebar + main panel)
- Use TabsContent to wrap each tab's content
- Import and use Tabs, TabsList, TabsTrigger, TabsContent from ui/Tabs
- Add api-settings.json import to en/zh locale index files for i18n support

Layout comparison:
- Before: Vertical sidebar (lg:w-64) with Card + nav buttons
- After: Horizontal tabs (TabsList) with tab triggers
2026-02-02 10:49:21 +08:00
catlog22
c522681c4c fix(frontend): fix i18n and runtime error in EndpointList
Fix hardcoded English labels in cache strategy display and prevent runtime
error when filePatterns is undefined.

Changes:
- Replace hardcoded "TTL:", "Max:", "Patterns:" with formatMessage calls
- Add optional chaining for filePatterns.length to prevent undefined error
- Add "filePatterns" i18n key to en/zh api-settings.json
2026-02-02 10:46:36 +08:00
catlog22
abce912ee5 feat(frontend): implement comprehensive API Settings Management Interface
Implement a complete API Management Interface for React frontend with split-
panel layout, migrating all features from legacy JS frontend.

New Features:
- API Settings page with 5 tabs: Providers, Endpoints, Cache, Model Pools, CLI Settings
- Provider Management: CRUD operations, multi-key rotation, health checks, test connection
- Endpoint Management: CRUD operations, cache strategy configuration, enable/disable toggle
- Cache Settings: Global configuration, statistics display, clear cache functionality
- Model Pool Management: CRUD operations, auto-discovery feature, provider exclusion
- CLI Settings Management: Provider-based and Direct modes, full CRUD support
- Multi-Key Settings Modal: Manage API keys with rotation strategies and weights
- Manage Models Modal: View and manage models per provider (LLM and Embedding)
- Sync to CodexLens: Integration handler for provider configuration sync

Technical Implementation:
- Created 12 new React components in components/api-settings/
- Extended lib/api.ts with 460+ lines of API client functions
- Created hooks/useApiSettings.ts with 772 lines of TanStack Query hooks
- Added RadioGroup UI component for form selections
- Implemented unified error handling with useNotifications across all operations
- Complete i18n support (500+ keys in English and Chinese)
- Route integration (/api-settings) and sidebar navigation

Code Quality:
- All acceptance criteria from plan.json verified
- Code review passed with Gemini (all 7 IMPL tasks complete)
- Follows existing patterns: Shadcn UI, TanStack Query, react-intl, Lucide icons
2026-02-01 23:58:04 +08:00
catlog22
690597bae8 fix(cli): fix codex review command argument handling
- Fix prompt incorrectly passed to codex review with target flags (--uncommitted/--base/--commit)
- Remove unsupported --skip-git-repo-check flag from codex review command
- Fix TypeScript type error in codex-lens.ts (missing 'installed' property)

Codex CLI constraint: --uncommitted/--base/--commit and [PROMPT] are mutually exclusive.
2026-02-01 23:51:58 +08:00
catlog22
e5252f8a77 feat: add useApiSettings hook for managing API settings, including providers, endpoints, cache, and model pools
- Implemented hooks for CRUD operations on providers and endpoints.
- Added cache management hooks for cache stats and settings.
- Introduced model pool management hooks for high availability and load balancing.
- Created localization files for English and Chinese translations of API settings.
2026-02-01 23:14:55 +08:00
catlog22
b76424feef fix(frontend): show empty state placeholders for quality rules and learnings in view mode
- Modify conditional rendering logic to always display section headers in view mode
- Add empty state placeholders when quality_rules/learnings arrays are empty
- Add localization keys for empty state messages in English and Chinese
- Improves UX by making these features visible even when no entries exist

Related files:
- ccw/frontend/src/pages/ProjectOverviewPage.tsx
- ccw/frontend/src/locales/en/project-overview.json
- ccw/frontend/src/locales/zh/project-overview.json
2026-02-01 23:11:46 +08:00
catlog22
76967a7350 feat: enhance workflow commands with dynamic analysis, multi-agent parallel exploration, and best practices
- analyze-with-file: Add dynamic direction generation from dimensions, support up to 4 parallel agent perspectives, enable cli-explore-agent parallelization
- brainstorm-with-file: Add dynamic direction generation from dimensions, add Agent-First guideline for complex tasks
- collaborative-plan-with-file: Add Understanding phase guidelines to prioritize latest documentation and resolve ambiguities with user clarification

Key improvements:
- Dimension-Direction Mapping replaces hard-coded options, enabling task-aware direction recommendations
- Multi-perspective parallel exploration (Analysis Perspectives, up to 4) with synthesis
- cli-explore-agent supports parallel execution per perspective for richer codebase context
- Agent-First principle: delegate complex tasks (code analysis, implementation) to agents/CLI instead of main process analysis
- Understanding phase emphasizes latest documentation discovery and clarification of ambiguities before planning
2026-02-01 22:51:04 +08:00
catlog22
7dcc0a1c05 feat: update usage recommendations across multiple workflow commands to require user confirmation and improve clarity 2026-02-01 22:04:26 +08:00
catlog22
5fb910610a fix(frontend): resolve URL path inconsistency caused by localStorage race condition
Fixed the issue where accessing the React frontend via ccw view with a URL path
parameter would load a different workspace due to localStorage rehydration race
condition.

Root cause: zustand persist's onRehydrateStorage callback automatically called
switchWorkspace with the cached projectPath before AppShell could process the
URL parameter.

Changes:
- workflowStore.ts: Remove automatic switchWorkspace from onRehydrateStorage
- AppShell.tsx: Centralize initialization logic with clear priority order:
  * Priority 1: URL ?path= parameter (explicit user intent)
  * Priority 2: localStorage fallback (implicit cache)
  * Added isWorkspaceInitialized state lock to prevent duplicate execution

Fixes: URL showing ?path=/new/path but loading /old/path from cache
2026-02-01 18:35:51 +08:00
catlog22
d46406df4a feat: Add CodexLens Manager Page with tabbed interface for managing CodexLens features
feat: Implement ConflictTab component to display conflict resolution decisions in session detail

feat: Create ImplPlanTab component to show implementation plan with modal viewer in session detail

feat: Develop ReviewTab component to display review findings by dimension in session detail

test: Add end-to-end tests for CodexLens Manager functionality including navigation, tab switching, and settings validation
2026-02-01 17:45:38 +08:00
catlog22
8dc115a894 feat(codex): convert 4 workflow commands to Codex prompt format with serial execution
Convert parallel multi-agent/multi-CLI workflows to Codex-compatible serial execution:

- brainstorm-with-file: Parallel Creative/Pragmatic/Systematic perspectives → Serial CLI execution
- analyze-with-file: cli-explore-agent + parallel CLI → Native tools (Glob/Grep/Read) + serial Gemini CLI
- collaborative-plan-with-file: Parallel sub-agents → Serial domain planning loop
- unified-execute-with-file: DAG-based parallel wave execution → Serial task-by-task execution

Key Technical Changes:
- YAML header: Remove 'name' and 'allowed-tools' fields
- Variables: $ARGUMENTS → $TOPIC/$TASK/$PLAN
- Task agents: Task() calls → ccw cli commands with --tool flag
- Parallel execution: Parallel Task/Bash calls → Sequential loops
- Session format: Match existing Codex prompt structure

Pattern: For multi-step workflows, use explicit wait points with " Wait for completion before proceeding"
2026-02-01 17:20:00 +08:00
catlog22
e9789e747a feat: update unified-execute-with-file command for sequential execution and improved dependency handling 2026-02-01 15:35:41 +08:00
catlog22
0342976c51 feat: add JSON detection utility for various formats
- Implemented a utility function `detectJsonInLine` to identify and parse JSON data from different formats including direct JSON, tool calls, tool results, embedded JSON, and code blocks.
- Introduced `JsonDetectionResult` interface to standardize the detection results.
- Added a new test results file to track the status of tests.
2026-02-01 15:17:03 +08:00
catlog22
f196b76064 chore(tests): remove obsolete test results and reports 2026-02-01 11:16:17 +08:00
catlog22
44cc4cad0f chore(tests): add gitignore for test results and reports 2026-02-01 11:16:00 +08:00
catlog22
fc1471396c feat(e2e): generate comprehensive E2E tests and fix TypeScript compilation errors
- Add 23 E2E test spec files covering 94 API endpoints across business domains
- Fix TypeScript compilation errors (file casing, duplicate export, implicit any)
- Update Playwright deprecated API calls (getByPlaceholderText -> getByPlaceholder)
- Tests cover: dashboard, sessions, tasks, workspace, loops, issues-queue, discovery,
  skills, commands, memory, project-overview, session-detail, cli-history,
  cli-config, cli-installations, lite-tasks, review, mcp, hooks, rules,
  index-management, prompt-memory, file-explorer

Test coverage: 100% domain coverage (23/23 domains)
API coverage: 94 endpoints across 23 business domains
Quality gates: 0 CRITICAL issues, all anti-patterns passed

Note: 700+ timeout tests require backend server (port 3456) to pass
2026-02-01 11:15:11 +08:00
catlog22
cf401d00e1 feat(cli-stream-monitor): add JSON card components and refactor tab UI
Add new components for CLI stream monitoring with JSON visualization:
- ExecutionTab: simplified tab with status indicator and active styling
- JsonCard: collapsible card for JSON data with type-based styling (6 types)
- JsonField: recursive JSON field renderer with color-coded values
- OutputLine: auto-detects JSON and renders appropriate component
- jsonDetector: smart JSON detection supporting 5 formats

Refactor CliStreamMonitorLegacy to use new components:
- Replace inline tab rendering with ExecutionTab component
- Replace inline output rendering with OutputLine component
- Add Badge import for active count display
- Fix type safety with proper id propagation

Component features:
- Type-specific styling for tool_call, metadata, system, stdout, stderr, thought
- Collapsible content (show 3 fields by default, expandable)
- Copy button and raw JSON view toggle
- Timestamp display
- Auto-detection of JSON in output lines

Fixes:
- Missing jsonDetector.ts file
- Type mismatch between OutputLine (6 types) and JsonCard (4 types)
- Unused isActive prop in ExecutionTab
2026-02-01 11:14:33 +08:00
catlog22
b66d20f5a6 Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2026-01-31 23:12:45 +08:00
catlog22
a2206df50f feat: add CliStreamMonitor and related components for CLI output streaming
- Implemented CliStreamMonitor component for real-time CLI output monitoring with multi-execution support.
- Created JsonFormatter component for displaying JSON content in various formats (text, card, inline).
- Added utility functions for JSON detection and formatting in jsonUtils.ts.
- Introduced LogBlock utility functions for styling CLI output lines.
- Developed a new Collapsible component for better UI interactions.
- Created IssueHubPage for managing issues, queue, and discovery with tab navigation.
2026-01-31 23:12:39 +08:00
catlog22
2f10305945 refactor(commands): replace SlashCommand with Skill tool invocation
Update all workflow command files to use Skill tool instead of SlashCommand:
- Change allowed-tools: SlashCommand(*) → Skill(*)
- Convert SlashCommand(command="/path", args="...") → Skill(skill="path", args="...")
- Update descriptive text references from SlashCommand to Skill
- Remove javascript language tags from code blocks (25 files)

Affected 25 command files across:
- workflow: plan, execute, init, lite-plan, lite-fix, etc.
- workflow/test: test-fix-gen, test-cycle-execute, tdd-plan, tdd-verify
- workflow/review: review-cycle-fix, review-module-cycle, review-session-cycle
- workflow/ui-design: codify-style, explore-auto, imitate-auto
- workflow/brainstorm: brainstorm-with-file, auto-parallel
- issue: discover, discover-by-prompt, plan
- ccw, ccw-debug

This aligns with the actual Skill tool interface which uses 'skill' and 'args' parameters.
2026-01-31 23:09:59 +08:00
catlog22
92ded5908f feat(flowchart): update implementation section and enhance edge styling
feat(taskdrawer): improve implementation steps display and support multiple file formats
2026-01-31 21:38:02 +08:00
catlog22
1bd082a725 feat: add tests and implementation for issue discovery and queue pages
- Implemented `DiscoveryPage` with session management and findings display.
- Added tests for `DiscoveryPage` to ensure proper rendering and functionality.
- Created `QueuePage` for managing issue execution queues with stats and actions.
- Added tests for `QueuePage` to verify UI elements and translations.
- Introduced `useIssues` hooks for fetching and managing issue data.
- Added loading skeletons and error handling for better user experience.
- Created `vite-env.d.ts` for TypeScript support in Vite environment.
2026-01-31 21:20:10 +08:00
catlog22
6d225948d1 feat(workflow): add interactive init-guidelines wizard for project guidelines configuration
Add /workflow:init-guidelines command that interactively fills project-guidelines.json
based on project analysis from project-tech.json. Features:
- 5-round questionnaire covering coding style, naming, file structure, documentation,
  architecture, tech stack, performance, security, and quality rules
- Dynamic question generation based on detected language/framework/architecture
- Append/reset mode for existing guidelines
- Multi-select options with "Other" for custom input

Modify /workflow:init to ask user whether to run init-guidelines after initialization
when guidelines are empty (scaffold only).
2026-01-31 20:58:29 +08:00
catlog22
35f9116cce feat: add support for dual frontend (JS and React) in the CCW application
- Updated CLI to include `--frontend` option for selecting frontend type (js, react, both).
- Modified serve command to start React frontend when specified.
- Implemented React frontend startup and shutdown logic.
- Enhanced server routing to handle requests for both JS and React frontends.
- Added workspace selector component with i18n support.
- Updated tests to reflect changes in header and A2UI components.
- Introduced new Radix UI components for improved UI consistency.
- Refactored A2UIButton and A2UIDateTimeInput components for better code clarity.
- Created migration plan for gradual transition from JS to React frontend.
2026-01-31 16:46:45 +08:00
catlog22
345437415f Add end-to-end tests for workspace switching and backend tests for ask_question tool
- Implemented E2E tests for workspace switching functionality, covering scenarios such as switching workspaces, data isolation, language preference maintenance, and UI updates.
- Added tests to ensure workspace data is cleared on logout and handles unsaved changes during workspace switches.
- Created comprehensive backend tests for the ask_question tool, validating question creation, execution, answer handling, cancellation, and timeout scenarios.
- Included edge case tests to ensure robustness against duplicate questions and invalid answers.
2026-01-31 16:02:20 +08:00
catlog22
715ef12c92 feat(a2ui): Implement A2UI backend with question handling and WebSocket support
- Added A2UITypes for defining question structures and answers.
- Created A2UIWebSocketHandler for managing WebSocket connections and message handling.
- Developed ask-question tool for interactive user questions via A2UI.
- Introduced platformUtils for platform detection and shell command handling.
- Centralized TypeScript types in index.ts for better organization.
- Implemented compatibility checks for hook templates based on platform requirements.
2026-01-31 15:27:12 +08:00
catlog22
4e009bb03a feat: add --with-commit parameter to workflow:execute for auto-commit after each task
- Add --with-commit flag to argument-hint and usage examples
- Auto-commit changes based on summary document after each agent task
- Minimal principle: only commit files modified by completed task
- Commit message format: {type}: {task-title} - {summary}
- Type mapping: feature→feat, bugfix→fix, refactor→refactor, etc.
2026-01-31 10:31:06 +08:00
catlog22
a0f81f8841 Add API error monitoring tests and error context snapshots for various browsers
- Created error context snapshots for Firefox, WebKit, and Chromium to capture UI state during API error monitoring.
- Implemented e2e tests for API error detection, including console errors, failed API requests, and proxy errors.
- Added functionality to ignore specific API patterns in monitoring assertions.
- Ensured tests validate the monitoring system's ability to detect and report errors effectively.
2026-01-31 00:15:59 +08:00
catlog22
f1324a0bc8 feat: enhance test-task-generate with Gemini enrichment and planning-notes mechanism
Implement two major enhancements to test generation workflow:

1. Gemini Test Enhancement (Phase 1.5)
   - Add Gemini CLI analysis for comprehensive test suggestions
   - Generate enriched test specifications for L1-L3 test layers
   - Focus on API contracts, integration patterns, error scenarios
   - Create gemini-enriched-suggestions.md as artifact

2. Planning Notes Mechanism (test-planning-notes.md)
   - Similar to plan.md's planning-notes pattern
   - Record Test Intent (Phase 1)
   - Embed complete Gemini enrichment (Phase 1.5)
   - Track consolidated test requirements
   - Support N+1 context with decisions and deferred items

Implementation Details:
   - Created Gemini prompt template: test-suggestions-enhancement.txt
   - Enhanced test-task-generate.md with Phase 1, 1.5, 2 logic
   - Gemini content embedded in planning-notes for single source of truth
   - test-action-planning-agent reads both TEST_ANALYSIS_RESULTS.md and test-planning-notes.md
   - Backward compatible: Phase 1.5 is optional enhancement

Benefits:
   - Comprehensive test coverage (API, integration, error scenarios)
   - Full traceability of test planning process
   - Consolidated context in one file for easy review
   - Preserved Gemini output as independent artifact
2026-01-30 23:51:57 +08:00
catlog22
81725c94b1 Add E2E tests for internationalization across multiple pages
- Implemented navigation.spec.ts to test language switching and translation of navigation elements.
- Created sessions-page.spec.ts to verify translations on the sessions page, including headers, status badges, and date formatting.
- Developed settings-page.spec.ts to ensure settings page content is translated and persists across sessions.
- Added skills-page.spec.ts to validate translations for skill categories, action buttons, and empty states.
2026-01-30 22:54:21 +08:00
catlog22
917de6f167 Merge pull request #109 from wzp-0815/fix-install-docs
Fix missing ccw install step in installation documentation
2026-01-30 22:06:28 +08:00
catlog22
e78e95049b feat: update dependencies and refactor dropdown components for improved functionality 2026-01-30 17:26:07 +08:00
catlog22
a5c3dff8d3 feat: implement FlowExecutor for executing flow definitions with DAG traversal and node execution 2026-01-30 16:59:18 +08:00
catlog22
0a7c1454d9 feat: add task JSON status update instructions to agents
Add jq commands for agents to update task status lifecycle:
- Step 0: Mark in_progress when starting
- Task Completion: Mark completed when finishing
2026-01-30 15:59:28 +08:00
catlog22
4a8481958a feat: add planning-notes consumption to plan-verify
- Add dimensions I (Constraints Compliance) and J (N+1 Context Validation)
- Verify tasks respect Consolidated Constraints from planning-notes.md
- Detect deferred items incorrectly included in current plan
- Check decision contradictions against N+1 Decisions table
2026-01-30 15:50:22 +08:00
catlog22
78b1287ced chore: Bump version to 6.3.54 2026-01-30 15:43:20 +08:00
catlog22
c6ad8e53b9 Add flow template generator documentation for meta-skill/flow-coordinator
- Introduced a comprehensive guide for generating workflow templates.
- Detailed usage instructions with examples for creating templates.
- Outlined execution flow across three phases: Template Design, Step Definition, and JSON Generation.
- Included JavaScript code snippets for each phase to facilitate implementation.
- Provided suggested step templates for various development scenarios.
- Documented command port references and minimum execution units for clarity.
2026-01-30 15:42:08 +08:00
catlog22
4006b2a0ee feat: add N+1 planning context recording to planning-notes
- Add N+1 Context section (Decisions + Deferred) to planning-notes.md init
- Add section 3.3 N+1 Context Recording in action-planning-agent.md
- Update task-generate-agent.md Phase 2A/2B/3 prompts with N+1 recording

Supports cross-module dependency resolution tracking and deferred items
for continuous planning iterations.
2026-01-30 15:42:00 +08:00
laoman.wzp
e464d93e29 Fix missing ccw install step in installation documentation
- Added the crucial `ccw install` step after npm installation in both
  English (INSTALL.md) and Chinese (INSTALL_CN.md) documentation
- Included detailed explanation of what ccw install does:
  * Installs workflows, scripts, templates to ~/.claude/
  * Installs skill definitions to ~/.codex/
  * Configures shell integration (optional)

This step is essential for the complete installation of CCW system files.

Co-Authored-By: Claude (Kimi-K2-Instruct-0905) <noreply@anthropic.com>
2026-01-30 14:47:21 +08:00
catlog22
0bb102c56a feat: add meta-skill flow-create command for workflow template generation
Interactive command to create flow-coordinator templates with comprehensive
command selection (9 categories), minimum execution units, and command port
reference integrated from ccw/ccw-coordinator/codex-coordinator.
2026-01-30 14:27:20 +08:00
catlog22
fca03a3f9c refactor: rename meta-skill → flow-coordinator, update template cmd paths
**Major changes:**
- Rename skill from meta-skill to flow-coordinator (avoid /ccw conflicts)
- Update all 17 templates: store full /workflow: command paths in cmd field
  - Session ID prefix: ms → fc (fc-YYYYMMDD-HHMMSS)
  - Workflow path: .workflow/.meta-skill → .workflow/.flow-coordinator
- Simplify SKILL.md schema documentation
  - Streamline Status Schema section
  - Consolidate Template Schema with single example
  - Remove redundant Field Explanations and behavior tables
- All templates now store cmd as full paths (e.g. /workflow:lite-plan)
  - Eliminates need for path assembly during execution
  - Matches ccw-coordinator execution format
2026-01-30 12:29:38 +08:00
catlog22
a9df4c6659 refactor: 移除统一执行命令的使用推荐部分,简化文档内容 2026-01-30 10:54:02 +08:00
catlog22
0a3246ab36 chore: Bump version to 6.3.53 2026-01-30 10:34:02 +08:00
catlog22
b5caee6b94 rename: collaborative-plan → collaborative-plan-with-file 2026-01-30 10:30:37 +08:00
catlog22
64d2156319 refactor: 统一 lite 工作流产物结构,合并 exploration+understanding 为 planning-context
- 合并 exploration.md 和 understanding.md 为单一的 planning-context.md
- 为所有 lite 工作流添加 Output Artifacts 表格
- 统一 agent 提示词的 Output Location 格式
- 更新 Session Folder Structure 包含 planning-context.md

涉及文件:
- cli-lite-planning-agent.md: 更新产物文档和格式模板
- collaborative-plan.md: 简化为 planning-context.md + sub-plan.json
- lite-plan.md: 添加产物表格和输出地址
- lite-fix.md: 添加产物表格和输出地址
2026-01-30 10:25:45 +08:00
catlog22
3f46a02df3 feat(cli): add settings file support for builtin Claude
- Enhance CLI status rendering to display settings file information for builtin Claude.
- Introduce settings file input in CLI manager for configuring the path to settings.json.
- Update Claude CLI tool interface to include settingsFile property.
- Implement settings file resolution and validation in CLI executor.
- Create a new collaborative planning workflow command with detailed documentation.
- Add test scripts for debugging tool configuration and command building.
2026-01-30 10:07:02 +08:00
catlog22
4b69492b16 feat: 添加 Codex 协调器命令,支持任务分析、命令链推荐和顺序执行 2026-01-29 23:36:42 +08:00
catlog22
67a578450c chore: Bump version to 6.3.52 2026-01-29 21:22:49 +08:00
catlog22
d5199ad2d4 Add merge-plans-with-file and quick-plan-with-file prompts for enhanced planning workflows
- Introduced merge-plans-with-file prompt for aggregating multiple planning artifacts, resolving conflicts, and synthesizing a unified execution plan.
- Implemented detailed execution process including discovery, normalization, conflict detection, resolution, and synthesis phases.
- Added quick-plan-with-file prompt for rapid planning with minimal documentation, utilizing multi-agent analysis for actionable outputs.
- Both prompts support various input formats and provide structured outputs for execution and documentation.
2026-01-29 21:21:29 +08:00
catlog22
f3c773a81e Refactor Codex Issue Plan-Execute Skill Documentation and CLI Options
- Deleted obsolete INDEX.md and OPTIMIZATION_SUMMARY.md files, consolidating documentation for improved clarity and organization.
- Removed skipGitRepoCheck option from CLI execution parameters to streamline command usage.
- Updated CLI executor utilities to automatically skip git repository checks, allowing execution in non-git directories.
- Enhanced documentation with new ARCHITECTURE.md and INDEX.md files for better navigation and understanding of the system architecture.
- Created CONTENT_MIGRATION_REPORT.md to verify zero content loss during the consolidation process.
2026-01-29 20:39:12 +08:00
catlog22
875b1f19bd feat: 完成 Codex Issue Plan-Execute Skill v2.0 优化
- 新增 OPTIMIZATION_SUMMARY.md,详细记录优化过程和成果
- 新增 README_OPTIMIZATION.md,概述优化后的文件结构和关键指标
- 创建 specs/agent-roles.md,整合 Planning Agent 和 Execution Agent 的角色定义
- 合并多个提示词文件,减少内容重复,优化 Token 使用
- 新建 ARCHITECTURE.md 和 INDEX.md,提供系统架构和文档导航
- 添加 CONTENT_MIGRATION_REPORT.md,确保内容迁移的完整性和零丢失
- 更新文件引用,确保向后兼容性,添加弃用通知
2026-01-29 20:37:30 +08:00
catlog22
c08f5382d3 fix: Improve command detail modal tab handling and error reporting 2026-01-29 17:48:06 +08:00
catlog22
21d764127f Add command relationships, essential commands, and validation script
- Introduced `command-relationships.json` to define internal calls, next steps, and prerequisites for various workflows.
- Created `essential-commands.json` to document key commands, their descriptions, arguments, and usage scenarios.
- Added `validate-help.py` script to check for the existence of source files referenced in command definitions, ensuring all necessary files are present.
2026-01-29 17:29:37 +08:00
catlog22
860dbdab56 fix: Unify execution IDs between broadcast events and session storage
- Pass generated executionId to cliExecutorTool.execute as id parameter
- Ensures CLI_EXECUTION_STARTED broadcast uses same ID as saved session
- Fixes "Conversation not found" errors when querying by broadcast ID
- Add DEBUG logging for executionId tracking

This resolves the mismatch where:
  - Broadcast event used ID from Date.now() at broadcast time
  - Session saved used different ID from Date.now() at completion time
  - Now all use the same ID generated at cli.ts:868

Changes:
- cli.ts:868 - executionId generated once
- cli.ts:1001 - pass executionId to execute() as id parameter
- cli-executor-core.ts automatically uses passed id as conversationId
2026-01-29 16:59:00 +08:00
catlog22
113dce55c5 fix: Auto-detect JSON Lines output format for Codex CLI
Problem: Codex CLI uses --json flag to output JSONL events, but executor was using plain text parser. This prevented proper parsing of structured events, breaking session creation.

Root cause: buildCommand() added --json flag for Codex but never communicated this to the output parser. Result: JSONL events treated as raw text → session markers lost.

Solution:
- Extend buildCommand() to return outputFormat
- Auto-detect 'json-lines' when tool is 'codex'
- Use auto-detected format in executeCliTool()
- Properly parse structured events and extract session data

Files modified:
- ccw/src/tools/cli-executor-utils.ts: Add output format auto-detection
- ccw/src/tools/cli-executor-core.ts: Use auto-detected format for parser
- ccw/src/commands/cli.ts: Add debug instrumentation

Verified:
- Codex outputs valid JSONL (confirmed via direct test)
- CLI_EXECUTION_STARTED events broadcast correctly
- Issue was downstream in output parsing, not event transmission
2026-01-29 16:38:30 +08:00
catlog22
0b791c03cf fix: Resolve API path resolution for document loading
- Fixed source paths in command.json: change ../../../ to ../../
  (sources are relative to .claude/skills/ccw-help/, need 2 levels to reach .claude/)
- Rewrote help-routes.ts /api/help/command-content endpoint:
  - Use resolve() to properly handle ../ sequences in paths
  - Resolve paths against commandJsonDir (where command.json is located)
  - Maintain security checks to prevent path traversal
- Verified all document paths now resolve correctly to .claude/commands/*

This fixes the 404 errors when loading command documentation in Help page.
2026-01-29 16:29:10 +08:00
catlog22
bbc94fb73a chore: Update ccw-help command index with all 73 commands
- Regenerated by analyze_commands.py
- Now includes all workflow, issue, memory, cli, and general commands
- Updated to version 3.0.0 with 73 commands and 19 agents
- Full index sync with file system definitions
2026-01-29 16:00:29 +08:00
catlog22
f5e435f791 feat: Optimize ccw-help skill with user-prompted update mechanism
- Add auto-update.py script for simple index regeneration
- Update SKILL.md with clear update instructions
- Simplify update mechanism: prompt user on skill execution
- Support both automatic and manual update workflows
- Clean version 2.3.0 metadata in command.json
2026-01-29 15:58:51 +08:00
catlog22
86d5be8288 feat: Enhance CCW help system with new command orchestration and dashboard features 2026-01-29 15:43:07 +08:00
catlog22
9762445876 refactor: Convert skill-generator from Chinese to English and remove emoji icons
- Convert all markdown files from Chinese to English
- Remove all emoji/icon decorations (🔧📋⚙️🏁🔍📚)
- Update all section headers, descriptions, and documentation
- Keep all content logic, structure, code examples unchanged
- Maintain template variables and file paths as-is

Files converted (9 files total):
- SKILL.md: Output structure comments
- templates/skill-md.md: All Chinese descriptions and comments
- specs/reference-docs-spec.md: All section headers and explanations
- phases/01-requirements-discovery.md through 05-validation.md (5 files)
- specs/execution-modes.md, skill-requirements.md, cli-integration.md, scripting-integration.md (4 files)
- templates/sequential-phase.md, autonomous-orchestrator.md, autonomous-action.md, code-analysis-action.md, llm-action.md, script-template.md (6 files)

All 16 files in skill-generator are now fully in English.
2026-01-29 15:42:46 +08:00
catlog22
b791c09476 docs: Add reference-docs-spec and optimize skill-generator for proper document organization
- Create specs/reference-docs-spec.md with comprehensive guidelines for phase-based reference document organization
- Update skill-generator's Mandatory Prerequisites to include new reference-docs-spec
- Refactor skill-md.md template to generate phase-based reference tables with 'When to Use' guidance
- Add generateReferenceTable() function to automatically create structured reference sections
- Replace flat template reference lists with phase-based navigation
- Update skill-generator's own SKILL.md to demonstrate correct reference documentation pattern
- Ensure all generated skills will have clear document usage timing and context
2026-01-29 15:28:21 +08:00
catlog22
26283e7a5a docs: Optimize reference documents with phase-based guidance and usage timing 2026-01-29 15:24:38 +08:00
catlog22
1040459fef docs: Add comprehensive summary of unified-execute-with-file implementation 2026-01-29 15:23:41 +08:00
catlog22
0fe8c18a82 docs: Add comparison guide between Claude and Codex unified-execute versions 2026-01-29 15:22:24 +08:00
catlog22
0086413f95 feat: Add Codex unified-execute-with-file prompt
- Create codex version of unified-execute-with-file command
- Supports universal execution of planning/brainstorm/analysis output
- Coordinates multi-agents with smart dependency management
- Features parallel/sequential execution modes
- Unified event logging as single source of truth (execution-events.md)
- Agent context passing through previous execution history
- Knowledge chain: each agent reads full history of prior executions

Codex-specific adaptations:
- Use $VARIABLE format for argument substitution
- Simplified header configuration (description + argument-hint)
- Plan format agnostic parsing (IMPL_PLAN.md, synthesis.json, conclusions.json, debug recommendations)
- Multi-wave execution orchestration
- Dynamic artifact location handling

Execution flow:
1. Parse and validate plan from $PLAN_PATH
2. Extract and normalize tasks with dependencies
3. Create execution session (.workflow/.execution/{sessionId}/)
4. Group tasks into execution waves (topological sort)
5. Execute waves sequentially, tasks within wave execute in parallel
6. Unified event logging: execution-events.md (SINGLE SOURCE OF TRUTH)
7. Each agent reads previous executions for context
8. Final statistics and completion report
2026-01-29 15:21:40 +08:00
catlog22
8ff698ae73 refactor: Optimize unified-execute-with-file command documentation
- Consolidate Phase 3 (Progress Tracking) from 205+ to 30 lines by merging redundant explanations of execution-events.md format
- Merge error handling logic from separate handleTaskFailure function into executeTask catch block
- Remove duplicate Execution Document Template section (identical to Step 1.2)
- Consolidate Phase 4 (Completion & Summary) from 90+ to 40 lines
- Overall reduction: 1094 → 807 lines (26% reduction) while preserving all technical information

Key improvements:
- Single source of truth for execution state (execution-events.md)
- Clearer knowledge chain explanation between agents
- More concise yet complete Phase documentation
- Unified event logging format is now prominently featured
2026-01-29 15:19:40 +08:00
catlog22
8cdd6a8b5f Add execution and planning agent prompts, specifications, and quality standards
- Created execution agent prompt for issue execution with detailed deliverables and validation criteria.
- Developed planning agent prompt to analyze issues and generate structured solution plans.
- Introduced issue handling specifications outlining the workflow and issue structure.
- Established quality standards for evaluating completeness, consistency, correctness, and clarity of solutions.
- Defined solution schema specification detailing the required structure and validation rules for solutions.
- Documented subagent roles and responsibilities, emphasizing the dual-agent strategy for improved workflow efficiency.
2026-01-29 15:15:42 +08:00
catlog22
b86a8afd8b feat: 添加统一执行引擎文档,支持多任务协调与增量执行 2026-01-29 15:14:56 +08:00
catlog22
53bd5a6d4b feat: 添加自定义提示文档,说明如何创建和管理可重用的提示 2026-01-29 11:30:29 +08:00
catlog22
3a7bbe0e42 feat: Optimize Codex prompt commands parameter flexibility
- Enhanced 14 commands with flexible parameter support
- Standardized argument formats across all commands
- Added English parameter descriptions for clarity
- Maintained backward compatibility

Commands optimized:
- analyze-with-file: Added --depth, --max-iterations
- brainstorm-with-file: Added --perspectives, --max-ideas, --focus
- debug-with-file: Added --scope, --focus, --depth
- issue-execute: Unified format, added --skip-tests, --skip-build, --dry-run
- lite-plan-a/b/c: Added depth and execution control flags
- execute: Added --parallel, --filter, --skip-tests
- brainstorm-to-cycle: Unified to --session format, added --launch
- lite-fix: Added --hotfix, --severity, --scope
- clean: Added --focus, --target, --confirm
- lite-execute: Unified --plan format, added execution control
- compact: Added --description, --tags, --force
- issue-new: Complete flexible parameter support

Unchanged (already optimal):
- issue-plan, issue-discover, issue-queue, issue-discover-by-prompt
2026-01-29 11:29:39 +08:00
catlog22
04a84f9893 feat: Simplify issue creation documentation by removing examples and clarifying title 2026-01-29 10:51:42 +08:00
catlog22
11638facf7 feat: Add --to-file option to ccw cli for saving output to files
Adds support for saving CLI execution output directly to files with the following features:
- Support for relative paths: --to-file output.txt
- Support for nested directories: --to-file results/analysis/output.txt (auto-creates directories)
- Support for absolute paths: --to-file /tmp/output.txt or --to-file D:/results/output.txt
- Works in both streaming and non-streaming modes
- Automatically creates parent directories if they don't exist
- Proper error handling with user-friendly messages
- Shows file save location in completion feedback

Implementation details:
- Updated CLI option parser in ccw/src/cli.ts
- Added toFile parameter to CliExecOptions interface
- Implemented file saving logic in execAction() for both streaming and non-streaming modes
- Updated HTTP API endpoint /api/cli/execute to support toFile parameter
- All changes are backward compatible

Testing:
- Tested with relative paths (single and nested directories)
- Tested with absolute paths (Windows and Unix style)
- Tested with streaming mode
- All tests passed successfully
2026-01-29 09:48:30 +08:00
catlog22
4d93ffb06c feat: Add migration handling for Codex old reference format in CLI manager 2026-01-28 23:37:46 +08:00
catlog22
204cb20617 chore(release): version 6.3.49
- Update package.json version to 6.3.49
- Add changelog entry for v6.3.49 with all commits since v6.3.48
- New features: CLI tools enhancements, skills system improvements, security fixes
- Documentation updates and UI improvements
2026-01-28 23:34:31 +08:00
catlog22
63f0daebbb feat: Update initialization process to prioritize in-memory configuration for CLI tool selection 2026-01-28 23:20:50 +08:00
catlog22
6ac041c1d8 feat: Enhance Codex CLI settings with toggle and refresh actions 2026-01-28 23:05:31 +08:00
catlog22
279adfd391 feat: Implement Codex CLI enhancement settings with API integration and UI toggle 2026-01-28 23:01:18 +08:00
catlog22
0a07138c27 feat: Add ccw-cli-tools skill specification with unified execution framework and configuration-driven tool selection 2026-01-28 22:55:36 +08:00
catlog22
a5d9e8ca87 feat: Enhance lite-skill-generator with single file output and improved validation 2026-01-28 22:23:19 +08:00
catlog22
502c8a09a1 fix(security): Apply 3 critical security fixes
- sec-001: Add validateAllowedPath to /api/file endpoint (path traversal)
- sec-002: Enable CSRF by default with CCW_DISABLE_CSRF opt-out
- sec-003: Add validateAllowedPath to /api/dialog/browse and /api/dialog/open-file (path traversal)

Ref: fix-1738072800000
2026-01-28 22:04:18 +08:00
catlog22
ed0255b8a2 Add skill tuning diagnosis report for skill-generator
- Introduced a new JSON file `skill-tuning-diagnosis.json` containing a comprehensive diagnosis of the skill-generator.
- Documented critical issues related to context management and data flow, including:
  - Full state serialization leading to unbounded context growth.
  - Scattered state writing without a unified schema.
  - Lack of input state schema validation in autonomous orchestrators.
- Provided detailed descriptions, impacts, root causes, and fix strategies for each identified issue.
- Summarized recommendations with priority levels for urgent fixes.
2026-01-28 22:00:20 +08:00
catlog22
6e94fc0740 chore: remove CLI endpoints section from Codex Code Guidelines 2026-01-28 21:33:43 +08:00
catlog22
b361a8c041 Add CLI endpoints documentation and unified script template for Bash and Python
- Updated AGENTS.md to include CLI tools usage and configuration details.
- Introduced a new script template for both Bash and Python, outlining usage context, calling conventions, and implementation guidelines.
- Provided examples for common patterns in both Bash and Python scripts.
- Established a directory convention for script organization and naming.
2026-01-28 21:29:21 +08:00
catlog22
24dad8cefd Refactor orchestrator logic and enhance problem taxonomy
- Updated orchestrator decision logic to improve state management and action selection.
- Introduced structured termination checks and action selection criteria.
- Enhanced state update mechanism with sliding window for action history and error tracking.
- Revised problem taxonomy for skill execution issues, consolidating categories and refining detection patterns.
- Improved severity calculation method for issue prioritization.
- Streamlined fix mapping strategies for better clarity and usability.
2026-01-28 21:08:49 +08:00
catlog22
071c98d89c feat: add brainstorm-to-cycle adapter for converting brainstorm output to parallel-dev-cycle input 2026-01-28 20:51:35 +08:00
catlog22
994718dee2 chore: remove unnecessary blank line in auto-parallel command documentation 2026-01-28 20:36:41 +08:00
catlog22
3998d24e32 Enhance skill generator documentation and templates
- Updated Phase 1 and Phase 2 documentation to include next phase links and data flow details.
- Expanded Phase 5 documentation to include comprehensive validation and README generation steps, along with validation report structure.
- Added purpose and usage context sections to various action and script templates (e.g., autonomous-action, llm-action, script-bash).
- Improved commands management by simplifying the command scanning logic and enabling/disabling commands through renaming files.
- Enhanced dashboard command manager to format group names and display nested groups with appropriate icons and colors.
- Updated LiteLLM executor to allow model overrides during execution.
- Added action reference guide and template reference sections to the skill-tuning SKILL.md for better navigation and understanding.
2026-01-28 20:34:03 +08:00
catlog22
29274ee943 feat(codex): add brainstorm-with-file prompt for interactive brainstorming workflow
- Add multi-perspective brainstorming workflow
- Support creative, pragmatic, and systematic analysis
- Include diverge-converge cycles with user interaction
- Add deep dive, devil's advocate, and idea merging
- Document thought evolution in brainstorm.md
2026-01-28 20:33:13 +08:00
catlog22
46d5739935 fix(changelog): update workflow references from review-fix to review-cycle-fix for consistency 2026-01-28 20:30:03 +08:00
catlog22
152cab2b7e feat: update review commands to use review-cycle-fix for automated fixing 2026-01-28 20:24:59 +08:00
catlog22
0cc5101c0e feat: Add phases for document consolidation, assembly, and compliance refinement
- Introduced Phase 2.5: Consolidation Agent to summarize analysis outputs and generate design overviews.
- Added Phase 4: Document Assembly to create index-style documents linking chapter files.
- Implemented Phase 5: Compliance Review & Iterative Refinement for CPCC compliance checks and updates.
- Established CPCC Compliance Requirements document outlining mandatory sections and validation functions.
- Created a base template for analysis agents to ensure consistency and efficiency in execution.
2026-01-28 19:57:24 +08:00
catlog22
4c78f53bcc feat: add commands management feature with API endpoints and UI integration
- Implemented commands routes for listing, enabling, and disabling commands.
- Created commands manager view with accordion groups for better organization.
- Added loading states and confirmation dialogs for enabling/disabling commands.
- Enhanced error handling and user feedback for command operations.
- Introduced CSS styles for commands manager UI components.
- Updated navigation to include commands manager link.
- Refactored existing code for better maintainability and clarity.
2026-01-28 08:26:37 +08:00
catlog22
cc5a5716cf fix(skills): improve robustness of enable/disable operations
- Add rollback in moveDirectory when rmSync fails after cpSync
- Add transaction rollback in disable/enableSkill when config save fails
- Surface config corruption by throwing on JSON parse errors
- Add robust JSON error parsing with fallback in frontend
- Add loading state and double-click prevention for toggle button
2026-01-28 08:25:59 +08:00
catlog22
af05874510 feat(skills): enhance moveDirectory function with rollback on failure and update config handling 2026-01-28 00:50:24 +08:00
catlog22
7a40f16235 feat(skills): implement enable/disable functionality for skills
- Added new API endpoints to enable and disable skills.
- Introduced logic to manage disabled skills, including loading and saving configurations.
- Enhanced skills routes to return lists of disabled skills.
- Updated frontend to display disabled skills and allow toggling their status.
- Added internationalization support for new skill status messages.
- Created JSON schemas for plan verification agent and findings.
- Defined new types for skill management in TypeScript.
2026-01-28 00:49:39 +08:00
catlog22
8d178feaac feat: 增强计划验证和上下文收集功能,支持自动执行和用户交互选择 2026-01-28 00:12:15 +08:00
catlog22
b3c47294e7 Enhance workflow commands and context management
- Updated `plan.md` to include new fields in context-package.json: prioritized_context, user_intent, priority_tiers, dependency_order, and sorting_rationale.
- Added validation for the existence of the prioritized_context field in context-package.json.
- Modified user decision flow in task generation to present action choices after planning completion.
- Improved context-gathering process in `context-gather.md` to integrate user intent and prioritize context based on user goals.
- Revised conflict-resolution documentation to require planning notes records after conflict analysis.
- Streamlined task generation in `task-generate-agent.md` to utilize pre-sorted context without redundant sorting.
- Removed unused settings persistence functions and corresponding tests from `claude-cli-tools.ts` and `settings-persistence.test.ts`.
2026-01-28 00:02:45 +08:00
catlog22
9989cfcf21 feat: 更新任务生成和执行限制,优化多模块任务管理 2026-01-27 23:34:31 +08:00
catlog22
1b6ace0447 feat: 添加规划笔记功能以支持任务生成和约束管理 2026-01-27 23:16:01 +08:00
catlog22
a3b303d8e3 Enhance CLI Lite Planning Agent with Mandatory Quality Check
- Added Phase 5: Plan Quality Check to cli-lite-planning-agent.md, detailing mandatory quality validation after plan generation.
- Introduced quality dimensions: completeness, granularity, dependencies, acceptance criteria, implementation steps, and constraint compliance.
- Specified CLI command format for quality check execution and expected output structure.
- Implemented result parsing and auto-fix strategies for minor issues.
- Updated integration flow to ensure quality check is executed before returning the plan to the orchestrator.

Refactor lite-plan.md to reflect internal quality check execution for medium/high complexity plans.

Create new brainstorm-with-file.md for interactive brainstorming workflow, detailing session setup, execution process, and implementation steps.
2026-01-27 23:02:05 +08:00
catlog22
0c1c87f704 fix: 修正 README_CN.md 交流群二维码图片扩展名
将引用从 .jpg 改为 .png 以匹配实际文件名
2026-01-26 09:47:42 +08:00
catlog22
985085c624 Refactor CLI Config Manager and Add Provider Model Routes
- Removed deprecated constants and functions from cli-config-manager.ts.
- Introduced new provider model presets in litellm-provider-models.ts for better organization and management of model information.
- Created provider-routes.ts to handle API endpoints for retrieving provider information and models.
- Added integration tests for provider routes to ensure correct functionality and response structure.
- Implemented unit tests for settings persistence functions, covering various scenarios and edge cases.
- Enhanced error handling and validation in the new routes and settings functions.
2026-01-25 17:27:58 +08:00
catlog22
7c16cc6427 feat: 添加 convert-to-plan 命令以将规划文档转换为问题解决方案 2026-01-25 12:32:42 +08:00
catlog22
6875108dda Add interactive analysis workflow with documented discussions and CLI exploration
- Introduced `analyze-with-file` command for collaborative analysis.
- Implemented session management for new and continued analysis sessions.
- Developed structured phases for topic understanding, exploration, discussion, and conclusion synthesis.
- Created detailed documentation for the workflow, including examples and implementation details.
- Added Codex prompt for deep analysis and exploration of codebase and concepts.
2026-01-25 11:08:13 +08:00
catlog22
9cff6f5f43 refactor(issue): remove 'merged' queue status, use 'archived' instead
- Remove 'merged' from VALID_QUEUE_STATUSES constant
- Update mergeQueues() to set status to 'archived' instead of 'merged'
- Preserve merged_into/merged_at metadata for traceability
- Update frontend to use 'archived' for button visibility checks
- Fix queue --json returning fake queue ID when no active queue exists
2026-01-25 10:56:46 +08:00
catlog22
fe2536d4cd feat: 增加队列状态“merged”及相关验证功能,添加状态参考文档 2026-01-25 10:11:52 +08:00
catlog22
16f27c080a docs: add Level 5 intelligent orchestration workflow guide to English version
- Added Level 5 (CCW Coordinator) chapter with complete Minimum Execution Units definition
- Added 3-Phase Workflow explanation (Analyze Requirements, Discover Commands, Execute)
- Integrated command port system for dynamic pipeline composition
- Added JavaScript task analysis and complexity assessment functions
- Included state file structure and complete Mermaid flowchart (119 lines)
- Updated Quick Selection Table to reference ccw-coordinator for complex workflows
- Updated Decision Flowchart to include Level 5 at top level
- Updated Summary Level Overview table to include Level 5 row
- Updated Core Principles with Level 5 selection criteria and usage guidelines
- Synchronized English version with WORKFLOW_GUIDE_CN.md Level 5 content
2026-01-24 21:41:31 +08:00
catlog22
874b70726d chore: archive unused test scripts and temporary documents
- Moved 6 empty test files (*.test.ts) to archive/
- Moved 5 Python test scripts (*.py) to archive/
- Moved 5 outdated/temporary documents to archive/
- Cleaned up root directory for better organization
2026-01-24 21:26:03 +08:00
catlog22
862365ffaf chore: 删除 Codex Subagent 使用规范文档 2026-01-24 21:17:59 +08:00
catlog22
b8c807b2f9 feat: add parent/child directory lookup for ccw cli output
- Implement findProjectWithExecution() to search upward through parent directories
- Add automatic project path discovery in outputAction
- Support explicit --project parameter for manual path specification
- Improve error messages with search scope indication
- Display project path in formatted output
- Enable cross-directory execution without working directory dependency
2026-01-24 21:17:21 +08:00
catlog22
7ea6362c50 docs: add Level 5 workflow guide with CCW Coordinator and decision flowchart
- Add "Level 5: 智能编排 (CCW Coordinator)" chapter to WORKFLOW_GUIDE_CN.md
- Integrate 6.2.8 version full lifecycle command decision flowchart (Mermaid)
- Document minimum execution units (最小执行单元) for planning, testing, and review
- Explain 3-phase workflow: requirements analysis, command discovery & recommendation, sequential execution
- Include command port system for dynamic command chain assembly
- Add state file structure (.workflow/.ccw-coordinator/{session_id}/state.json)
- Document 3 typical scenarios: simple feature, bug fix, complex feature development
- Update overview diagram to show Level 5 with automation progression
- Update workflow selection guide, decision flowchart, and summary table
- Add Level 5 relationship documentation to other workflow levels
2026-01-24 21:15:44 +08:00
catlog22
b435391f17 docs: add /ccw and /ccw-coordinator as recommended commands
- Add prominent section highlighting /ccw and /ccw-coordinator as main features
- /ccw: Auto workflow orchestrator for general tasks
- /ccw-coordinator: Smart orchestrator with intelligent recommendations
- Include comparison table, quick examples, and key differences
- Update both English and Chinese READMEs
2026-01-24 15:12:33 +08:00
catlog22
88ff109ac4 chore: bump version to 6.3.48 2026-01-24 15:06:36 +08:00
catlog22
261196a804 docs: update CCW CLI commands with recommended commands and usage examples 2026-01-24 15:05:37 +08:00
catlog22
ea6cb8440f chore: bump version to 6.3.47
- Update ccw-coordinator.md with clarified CLI execution format
- Command-first prompt structure: /workflow:<command> -y <parameters>
- Simplified documentation with universal prompt template
- Clarify that -y is a prompt parameter, not a ccw cli parameter
2026-01-24 14:52:09 +08:00
catlog22
bf896342f4 refactor: adjust prompt structure for command execution clarity 2026-01-24 14:51:05 +08:00
catlog22
f2b0a5bbc9 Refactor code structure and remove redundant changes 2026-01-24 14:47:47 +08:00
catlog22
cf5fecd66d fix(codex-lens): resolve installation issues from frontend
- Add missing README.md file required by setuptools
- Fix deprecated license format in pyproject.toml (use SPDX string instead of TOML table)
- Add MIT LICENSE file for proper packaging
- Verified successful local installation and import

Fixes permission denied error during npm-based installation on macOS
2026-01-24 14:43:39 +08:00
catlog22
86d469ccc9 build: exclude test files from TypeScript compilation 2026-01-24 14:35:05 +08:00
catlog22
357d3524f5 chore: bump version to 6.3.46 2026-01-24 14:31:29 +08:00
catlog22
4334162ddf refactor: remove unused command definitions from ccw-coordinator 2026-01-24 14:29:51 +08:00
catlog22
2dcd1637f0 refactor: enhance documentation on Minimum Execution Units and command grouping in CCW 2026-01-24 14:27:58 +08:00
catlog22
38e1cdc737 chore(release): publish 6.3.45
## Features

- New `ccw` command: Main process workflow orchestrator with auto intent-based workflow selection
- New CommandRegistry for dynamic command discovery and metadata management

## Improvements

- Optimize ccw-coordinator: Serial blocking execution model with hook-based continuation
- Refactor execution flow: Stop after CLI launch, wait for hook callbacks (no polling)
- Add task_id tracking and state.json checkpoints for resumable execution
- Consolidate documentation: Reduce report verbosity while maintaining all core information

## Documentation

- Add Execution Model comparison (main process vs external CLI)
- Add State Management section with TodoWrite tracking examples
- Update Type Comparison table highlighting ccw vs ccw-coordinator differences
- Simplify code examples with inline comments

## Changes Summary

- ccw-coordinator.md: +272/-26 (serial blocking), -143 docs (consolidation)
- ccw.md: +121/-352 (state management, execution model)
- Rename: CCW-COORDINATOR.md → ccw-coordinator.md (lowercase)
2026-01-24 14:09:52 +08:00
catlog22
097a7346b9 refactor: optimize ccw.md with streamlined documentation and state management
- Add Execution Model section (Synchronous vs Async blocking comparison)
- Add State Management section (TodoWrite-based tracking)
- Simplify Phase 1-5 code (remove verbose comments, consolidate logic)
- Consolidate Pipeline Examples into table format (5 examples → 1 table)
- Update Type Comparison table (highlight ccw vs ccw-coordinator differences)
- Maintain all core information (no content loss)

Changes:
- -352 lines (verbose explanations, redundant code)
- +121 lines (consolidated content, new sections)
- net: -231 lines (35% reduction: 665→433 lines)

Key additions:
- Execution Model flow diagram
- State Management with TodoWrite example
- Type Comparison: Synchronous (main) vs Async (external CLI)
2026-01-24 14:06:31 +08:00
catlog22
9df8063fbd refactor: reduce documentation report, consolidate overlapping content
- Eliminate redundant Stop-Action explanations (moved to CLI Execution Model)
- Remove verbose hook/error handling examples (keep in code only)
- Consolidate 5-step CLI example into 1-line pattern
- Simplify handleCliCompletion function comments
- Streamline executor loop exit notes
- Maintain all core information (no content loss)
- Reduce report from ~1000 lines to ~900 lines

Changes:
- -143 lines (old verbose explanations)
- +21 lines (consolidated content)
- net: -122 lines
2026-01-24 14:00:34 +08:00
catlog22
d00f0bc7ca refactor: improve CCW orchestrator with serial blocking execution and hook-based continuation
- Rename file to lowercase: CCW-COORDINATOR.md → ccw-coordinator.md
- Replace polling waitForTaskCompletion with stop-action blocking model
- CLI commands execute in background with immediate stop (no polling)
- Hook callbacks (handleCliCompletion) trigger continuation to next command
- Add task_id and completed_at fields to execution_results
- Maintain state checkpoint after each command launch
- Add status flow documentation (running → waiting → completed)
- Include CLI invocation example with hook configuration
- Separate concerns: orchestrator launches, hooks handle callbacks
- Support serial execution: one command at a time with break after launch
2026-01-24 13:57:08 +08:00
catlog22
24efef7f17 feat: Add main workflow orchestrator (ccw) with intent analysis and command execution
- Implemented the ccw command as a main workflow orchestrator.
- Added a 5-phase workflow including intent analysis, requirement clarification, workflow selection, user confirmation, and command execution.
- Developed functions for analyzing user input, selecting workflows, and executing command chains.
- Integrated TODO tracking for command execution progress.
- Created comprehensive tests for the CommandRegistry, covering YAML parsing, command retrieval, and error handling.
2026-01-24 13:43:47 +08:00
catlog22
44b8269a74 feat: add CommandRegistry for command management and direct imports 2026-01-24 13:29:50 +08:00
catlog22
dd51837bbc Enhance CCW Coordinator: Refactor command execution flow, improve prompt generation, and update documentation
- Refactored the command execution process to support dynamic command chaining and intelligent prompt generation.
- Updated the architecture overview to reflect changes in the orchestrator and command execution logic.
- Improved the prompt generation strategy to directly include complete command calls, enhancing clarity and usability.
- Added detailed examples and templates for command prompts in the documentation.
- Enhanced error handling and user decision-making during command execution failures.
- Introduced logging for command execution details and state updates for better traceability.
- Updated specifications and README files to align with the new command execution and prompt generation logic.
2026-01-24 12:44:40 +08:00
catlog22
a17edc3e50 chore(release): publish 6.3.44 2026-01-24 11:29:39 +08:00
catlog22
01ab3cf3fa feat: enhance tdd-verify command with detailed compliance reporting and validation improvements 2026-01-24 11:10:31 +08:00
catlog22
a2c1b9b47c fix: replace hardcoded Windows paths with dynamic cross-platform paths in CodexLens error messages
- Remove hardcoded Windows paths (D:\Claude_dms3\codex-lens) that were displayed to macOS/Linux users
- Generate dynamic possible paths list based on runtime environment
- Support multiple installation locations (cwd, project root, home directory)
- Improve error messages with platform-appropriate paths
- Maintain consistency across both bootstrapWithUv() and installSemanticWithUv() functions

Fixes remaining issue from #104 regarding cross-platform error message compatibility
2026-01-24 11:08:02 +08:00
catlog22
780e118844 fix: resolve CodexLens installation failure with NPM global install
Implements two-pass search strategy to support CodexLens in NPM global installations. Fixes issue #104.
2026-01-24 10:52:07 +08:00
catlog22
159dfd179e Refactor action plan verification command to plan verification
- Updated all references from `/workflow:action-plan-verify` to `/workflow:plan-verify` across various documentation and command files.
- Introduced a new command file for `/workflow:plan-verify` that performs read-only verification analysis on planning artifacts.
- Adjusted command relationships and help documentation to reflect the new command structure.
- Ensured consistency in command usage throughout the workflow guide and getting started documentation.
2026-01-24 10:46:15 +08:00
catlog22
6c80168612 feat: enhance project root detection with caching and debug logging 2026-01-24 10:04:04 +08:00
catlog22
a293a01d85 feat: add --yes flag for auto-confirmation across multiple workflows
- Enhanced lite-execute, lite-fix, lite-lite-lite, lite-plan, multi-cli-plan, plan, replan, session complete, session solidify, and various UI design commands to support a --yes or -y flag for skipping user confirmations and auto-selecting defaults.
- Updated argument hints and examples to reflect new auto mode functionality.
- Implemented auto mode defaults for confirmation, execution methods, and code review options.
- Improved error handling and validation in command parsing and execution processes.
2026-01-24 09:23:24 +08:00
jerry
ab259b1970 fix: resolve CodexLens installation failure with NPM global install
- Implement two-pass search strategy for codex-lens path detection
- First pass: prefer non-node_modules paths (development environment)
- Second pass: allow node_modules paths (NPM global install)
- Fixes CodexLens installation for all NPM global install users
- No breaking changes, maintains backward compatibility

Resolves issue where NPM global install users could not install CodexLens
because the code rejected paths containing /node_modules/, which is the
only valid location for codex-lens in NPM installations.

Tested on macOS with Node.js v22.18.0 via NPM global install.
2026-01-24 08:58:44 +08:00
catlog22
fd50adf581 feat: Update command validation tools and improve README documentation 2026-01-24 08:41:32 +08:00
catlog22
24a28f289d refactor: Rename command-registry.js to command-registry.cjs and update references 2026-01-23 23:54:08 +08:00
catlog22
e727a07fc5 feat: Implement CCW Coordinator for interactive command orchestration
- Add action files for session management, command selection, building, execution, and completion.
- Introduce orchestrator logic to drive state transitions and action selection.
- Create state schema to define session state structure.
- Develop command registry and validation tools for command metadata extraction and chain validation.
- Establish skill configuration and specifications for command library and validation rules.
- Implement tools for command registry and chain validation with CLI support.
2026-01-23 23:39:16 +08:00
catlog22
8179472e56 fix: auto-sync CLI tools availability on first config creation (Issue #95)
**问题描述**:
新安装 CCW 后,默认配置中所有 CLI 工具 enabled: true,但实际上用户可能没有安装这些工具,导致执行任务时尝试调用未安装的工具而失败。

**根本原因**:
- DEFAULT_TOOLS_CONFIG 中所有工具默认 enabled: true
- 首次创建配置时不检测工具实际可用性
- 现有的 syncBuiltinToolsAvailability() 只在用户手动触发时才执行

**修复内容**:
1. 新增 ensureClaudeCliToolsAsync() 异步版本
   - 在创建默认配置后自动调用 syncBuiltinToolsAvailability()
   - 通过 which/where 命令检测工具实际可用性
   - 根据检测结果自动调整 enabled 状态

2. 更新两个关键 API 端点使用新函数
   - /api/cli/endpoints - 获取 API 端点列表
   - /api/cli/tools-config - 获取 CLI 工具配置

**效果**:
- 首次安装时自动检测并禁用未安装的工具
- 避免调用不可用工具导致的错误
- 用户可在 Dashboard 中看到准确的工具状态

Fixes #95
2026-01-23 23:20:58 +08:00
catlog22
277b3f86f1 feat: Enhance TDD workflow with specialized executor and optimized task generation
- Create tdd-developer.md: Specialized TDD agent with Red-Green-Refactor awareness
  - Full TDD metadata parsing (tdd_workflow, max_iterations, cli_execution)
  - Green phase Test-Fix Cycle with automatic diagnosis and repair
  - CLI session resumption strategies (new/resume/fork/merge_fork)
  - Auto-revert safety mechanism when max_iterations reached

- Optimize task-generate-tdd.md: Enhanced task generation with CLI support
  - Phase 0: User configuration questionnaire (materials, execution method, CLI tool)
  - Phase 1: Progressive loading strategy (Core → Selective → On-Demand)
  - CLI Execution ID management with dependency-based strategy selection
  - Fixed task limit to 18 (consistent with system-wide limit)
  - Fixed double-slash path issues in output structure
  - Enhanced tdd_cycles schema documentation with full structure
  - Unified resume_from type documentation (string | string[])

- Update tdd-plan.md: Workflow orchestrator improvements
  - Phase 0 user configuration details
  - Enhanced validation rules for CLI execution IDs
  - Updated error handling for 18-task limit

Validated by Gemini CLI analysis - complete execution chain compatibility confirmed.
2026-01-23 23:01:56 +08:00
catlog22
7a6f4c3f22 chore: bump version to 6.3.43 - fix parallel-dev-cycle documentation inconsistencies 2026-01-23 17:52:12 +08:00
catlog22
2f32d08d87 feat: Update documentation and file references for changes.log in parallel development cycle 2026-01-23 17:51:21 +08:00
catlog22
79d20add43 feat: Enhance Code Developer and Requirements Analyst agents with proactive debugging and self-enhancement strategies 2026-01-23 17:41:17 +08:00
catlog22
f363c635f5 feat: Enhance issue loading with intelligent grouping for batch processing 2026-01-23 17:03:27 +08:00
catlog22
61e3747768 feat: Add batch solutions endpoint (ccw issue solutions)
- Add solutionsAction() to query all bound solutions in one call
- Reduces O(N) queries to O(1) for queue formation
- Update /issue:queue command to use new endpoint
- Performance: 18 individual queries → 1 batch query

Version: 6.3.42
2026-01-23 16:56:08 +08:00
catlog22
54ec6a7c57 feat: Enhance issue management with batch processing and solution querying
- Updated issue loading process to create batches based on size (max 3 per batch).
- Removed semantic grouping in favor of simple size-based batching.
- Introduced a new command to batch query solutions for multiple issues.
- Improved solution loading to fetch all planned issues with bound solutions in a single call.
- Added detailed handling for multi-solution issues, including user selection for binding.
- Created a new workflow command for multi-agent development with documented progress and incremental iteration support.
- Added .gitignore for ace-tool directory to prevent unnecessary files from being tracked.
2026-01-23 16:55:10 +08:00
catlog22
d6a3da2084 chore: bump version to 6.3.41 2026-01-23 12:40:01 +08:00
catlog22
b9f17f0fcf fix: Add required 'name' field to Codex skill YAML frontmatter
According to OpenAI Codex skill specification, SKILL.md files must have both
'name' and 'description' fields in YAML frontmatter. Added missing 'name' field
to all three skills:
- CCW Loop
- CCW Loop-B
- Parallel Dev Cycle

Also enhanced ccw-loop description with Chinese trigger keywords for better
multi-language support.
2026-01-23 12:38:45 +08:00
catlog22
88eb42f65b chore: bump version to 6.3.40 2026-01-23 10:23:43 +08:00
catlog22
b1ac0cf8ff feat: Add communication optimization and coordination protocol for multi-agent system
- Introduced a new specification for agent communication optimization focusing on file references instead of content transfer to enhance efficiency and reduce message size.
- Established a coordination protocol detailing communication channels, message formats, and dependency resolution strategies among agents (RA, EP, CD, VAS).
- Created a unified progress format specification for all agents, standardizing documentation structure and versioning practices.
2026-01-23 10:04:31 +08:00
catlog22
09eeb84cda chore: bump version to 6.3.39 2026-01-22 23:39:02 +08:00
catlog22
2fb1d1243c feat: prioritize user config, do not merge default tools
Changed loadClaudeCliTools() to only load tools explicitly defined
in user config. Previously, DEFAULT_TOOLS_CONFIG.tools was spread
before user tools, causing all default tools to be loaded even if
not present in user config.

User config now has complete control over which tools are loaded.
2026-01-22 23:37:42 +08:00
catlog22
ac62bf70db fix: preserve envFile in ensureToolTags merge function
The ensureToolTags() function was only returning enabled, primaryModel,
secondaryModel, and tags - missing envFile. This caused envFile to be
lost during config merge in loadClaudeCliTools().

Related to #96 - gemini envFile setting lost after page refresh
2026-01-22 23:35:33 +08:00
catlog22
edb55c4895 fix: include envFile in getFullConfigResponse API response
Fixes #96 - gemini/qwen envFile setting was lost after page refresh
because getFullConfigResponse() was not including the envFile field
when converting config to the legacy API format.

Changes:
- Add envFile?: string | null to CliToolConfig interface
- Include envFile in getFullConfigResponse() conversion
2026-01-22 23:30:01 +08:00
catlog22
8a7f636a85 feat: Refactor intelligent cleanup command for clarity and efficiency 2026-01-22 23:25:34 +08:00
catlog22
97ab82628d Add intelligent cleanup command with mainline detection and artifact discovery
- Introduced the `/workflow:clean` command for intelligent code cleanup.
- Implemented mainline detection to identify active development branches and core modules.
- Added drift analysis to discover stale sessions, abandoned documents, and dead code.
- Included safe execution features with staged deletion and confirmation.
- Documented usage, execution process, and implementation details in `clean.md`.
2026-01-22 23:19:54 +08:00
catlog22
be89552b0a feat: Add ccw-loop-b hybrid orchestrator skill with specialized workers
Create new ccw-loop-b skill implementing coordinator + workers architecture:

**Skill Structure**:
- SKILL.md: Entry point with three execution modes (interactive/auto/parallel)
- phases/state-schema.md: Unified state structure
- specs/action-catalog.md: Complete action reference

**Worker Agents**:
- ccw-loop-b-init.md: Session initialization and task breakdown
- ccw-loop-b-develop.md: Code implementation and file operations
- ccw-loop-b-debug.md: Root cause analysis and problem diagnosis
- ccw-loop-b-validate.md: Testing, coverage, and quality checks
- ccw-loop-b-complete.md: Session finalization and commit preparation

**Execution Modes**:
- Interactive: Menu-driven, user selects actions
- Auto: Predetermined sequential workflow
- Parallel: Concurrent worker execution with batch wait

**Features**:
- Flexible coordination patterns (single/multi-agent/hybrid)
- Batch wait API for parallel execution
- Unified state management (.loop/ directory)
- Per-worker progress tracking
- No Claude/Codex comparison content (follows new guidelines)

Follows updated design principles:
- Content independence (no framework comparisons)
- Mode flexibility (no over-constraining)
- Coordinator pattern with specialized workers
2026-01-22 23:10:43 +08:00
catlog22
df25b43884 fix(install): change default for Git Bash multi-line prompt fix to false 2026-01-22 22:59:22 +08:00
catlog22
04cd536da5 chore: bump version to 6.3.38 2026-01-22 22:54:42 +08:00
catlog22
9a3608173a feat: Add multi-perspective issue discovery and structured issue creation
- Implemented issue discovery prompt to analyze code from various perspectives (bug, UX, test, quality, security, performance, maintainability, best-practices).
- Created structured issue generation prompt from GitHub URLs or text descriptions, including clarity detection and optional clarification questions.
- Introduced CCW Loop-B hybrid orchestrator pattern for iterative development, featuring a coordinator and specialized workers with batch wait support.
- Defined state management, session structure, and output schemas for the CCW Loop-B workflow.
- Added error handling and best practices documentation for the new features.
2026-01-22 22:53:05 +08:00
catlog22
f5b6bb97bc feat(issue-manager): update queue status display logic in renderQueueCard function 2026-01-22 22:33:44 +08:00
catlog22
2819f3597f feat: Add validation action and orchestrator for CCW Loop
- Implemented the VALIDATE action to run tests, check coverage, and generate reports.
- Created orchestrator for managing CCW Loop execution using Codex subagent pattern.
- Defined state schema for unified loop state management.
- Updated action catalog with new actions and their specifications.
- Enhanced CLI and issue routes to support new features and data structures.
- Improved documentation for Codex subagent design principles and action flow.
2026-01-22 22:32:37 +08:00
catlog22
c0c1a2eb92 fix(dashboard): make showHidden state match checkbox checked state
Fixes #97 - File browser "Show Hidden Files" checkbox appeared checked
but hidden files weren't displayed until the checkbox was toggled.

Root cause: Timing mismatch where loadFileBrowserDirectory() was called
before initFileBrowserEvents(), causing the initial API request to send
showHidden: false while the checkbox was checked.

Fix: Initialize fileBrowserState.showHidden = true in showFileBrowserModal()
to match the checkbox's default checked state.
2026-01-22 22:21:54 +08:00
catlog22
012197a861 删除 Plan-A 与 Plan-B 的比较部分,以简化文档内容 2026-01-22 21:42:20 +08:00
catlog22
407b2e6930 Add lightweight interactive planning workflows: Lite-Plan-B and Lite-Plan-C
- Introduced Lite-Plan-B for hybrid mode planning with multi-agent parallel exploration and primary agent merge/clarify/plan capabilities.
- Added Lite-Plan-C for Codex subagent orchestration, featuring intelligent task analysis, parallel exploration, and adaptive planning based on task complexity.
- Both workflows include detailed execution processes, session setup, and structured output formats for exploration and planning results.
2026-01-22 21:40:57 +08:00
catlog22
6428febdf6 Add universal-executor agent and enhance Codex subagent documentation
- Introduced a new agent: universal-executor, designed for versatile task execution across various domains with a systematic approach.
- Added comprehensive documentation for Codex subagents, detailing core architecture, API usage, lifecycle management, and output templates.
- Created a new markdown file for Codex subagent usage guidelines, emphasizing parallel processing and structured deliverables.
- Updated codex_prompt.md to clarify the deprecation of custom prompts in favor of skills for reusable instructions.
2026-01-22 20:41:37 +08:00
catlog22
9f9ef1d054 Refactor code structure for improved readability and maintainability 2026-01-22 18:22:38 +08:00
catlog22
ea04663035 fix(multi-cli): populate multiCliPlan sessions in liteTaskDataStore
Fix task click handlers not working in multi-CLI planning detail page.

Root cause: liteTaskDataStore was not being populated with multiCliPlan
sessions during initialization, so task click handlers couldn't access
session data using currentSessionDetailKey.

Changes:
- navigation.js: Add code to populate multiCliPlan sessions in liteTaskDataStore
- notifications.js: Add code to populate multiCliPlan sessions when data refreshes

Now when task detail page loads, liteTaskDataStore contains the correct key
'multi-cli-${sessionId}' matching currentSessionDetailKey, allowing task
click handlers to find session data and open detail drawer.

Verified: Task clicks now properly open detail panel for all 7 tasks.
2026-01-22 15:41:01 +08:00
catlog22
f0954b3247 fix(lite-execute): pass project-guidelines.json to execution phase
Ensure buildExecutionPrompt includes project constraints reference,
maintaining consistency with full workflow (plan + execute) which passes
project_guidelines via context-package.json. This allows execution phase
to respect user-defined constraints (via /workflow:session:solidify).
2026-01-22 15:30:36 +08:00
catlog22
2fffe78dc9 fix(multi-cli): complete solution details display in summary tab (#98)
Fixed issue where multi-CLI planning solution cards only showed count,
feasibility, effort, and risk badges but had empty content area.

Changes:
- Enhanced renderMultiCliSummaryContent() to extract and display all solution fields
  - Solution name (name/title)
  - Feasibility score (feasibility)
  - Effort level (effort)
  - Risk level (risk)
  - Summary/description (summary)
  - Pros list (pros)
  - Cons list (cons)

- Added CSS styles for solution cards
  - .solution-details, .details-label, .details-list
  - .solution-header, .solution-title-row, .solution-badges
  - .badge with variants for feasibility/effort/risk

- Fixed related issues:
  - Added multiCliPlan support to backend data structures
  - Exposed liteTaskDataStore to window for global access
  - Fixed header left-alignment in detail pages
  - Added 'active' class to tab content for visibility

Files modified:
- ccw/src/templates/dashboard-js/views/lite-tasks.js
- ccw/src/templates/dashboard-css/04-lite-tasks.css
- ccw/src/core/server.ts
- ccw/src/core/routes/system-routes.ts
- ccw/src/templates/dashboard-js/state.js
- ccw/src/templates/dashboard-css/02-session.css
- ccw/src/config/litellm-api-config-manager.ts (fix homedir import)

Closes #98
2026-01-22 15:30:35 +08:00
catlog22
02531c4d15 feat: i18n for CLI history view; fix Claude session discovery path encoding
## Changes

### i18n 中文化 (i18n.js, cli-history.js)
- 添加 60+ 个翻译键用于 CLI 执行历史和对话详情
- 将 cli-history.js 中的硬编码英文字符串替换为 t() 函数调用
- 覆盖范围: 执行历史、对话详情、状态、工具标签、按钮、提示等

### 修复 Claude 会话追踪 (native-session-discovery.ts)
- 问题: Claude 使用路径编码存储会话 (D:\path -> D--path),但代码使用 SHA256 哈希导致无法发现
- 解决方案:
  - 添加 encodeClaudeProjectPath() 函数用于路径编码
  - 更新 ClaudeSessionDiscoverer.getSessions() 使用路径编码
  - 增强 extractFirstUserMessage() 支持多种消息格式 (string/array)
- 结果: Claude 会话现可正确关联,UI 按钮 "查看完整过程对话" 应可正常显示

## 验证
- npm run build 通过 
- Claude 会话发现 1267 个会话 
- 消息提取成功率 80% 
- 路径编码验证正确 
2026-01-22 14:53:38 +08:00
catlog22
5fa7524ad7 feat(loop): support external CLI tools (cli-wrapper) in task management
- Fix missing i18n translations: loop.add, loop.save, loop.cancel
- Replace hardcoded validTools with dynamic tool loading from cli-tools.json
- Support external CLI wrappers (like doubao) in task creation and updates
- Add getEnabledToolsList() helper to fetch enabled tools dynamically
- Update mapIssueToolToLoopTool() to accept any string tool name
- Update validateTool() to use dynamic tool list
- Change LoopTask.tool type from specific strings to string (accepts any tool)

This allows tasks to use any enabled CLI tool from configuration,
including builtin tools, cli-wrappers, and api-endpoints, not just
the hardcoded ['bash', 'gemini', 'codex', 'qwen', 'claude'].
2026-01-22 12:43:37 +08:00
catlog22
21fbdbc55e feat(loop-monitor): add 'In Development' badge and bump to v6.3.37
- Add 'In Development' (开发中) badge to Loop Monitor navigation item
- Use yellow highlight to indicate development status
- Add i18n translations: nav.inDevelopment ('In Dev' / '开发中')
- Bump version to 6.3.37

The Loop Monitor feature is now clearly marked as under development,
helping users understand it may have limited functionality.
2026-01-22 11:59:07 +08:00
catlog22
1f1a078450 feat(loop-monitor): implement dynamic tool loading for task modals
- Add getEnabledTools() async function to fetch tools from /api/cli/tools-config
- Cache enabled tools in window.enabledTools to avoid repeated API calls
- Replace hardcoded tool options in add task modal with dynamic generation
- Replace hardcoded tool options in edit task modal with dynamic generation
- Fallback to ['claude'] if no tools enabled, all tools if API fails
- Make showAddTaskModal() and showEditTaskModal() async functions
- Update editTask() to use await when calling showEditTaskModal()

Fixes issue where task modals only showed hardcoded tools instead of
loading enabled tools from CLI configuration.
2026-01-22 11:53:17 +08:00
catlog22
d3aeac4e9f style: replace square icon with inbox icon for created status
Icon Update:
- created status: square → inbox

Rationale:
- Inbox icon is more visually intuitive
- Better conveys the meaning of 'new/pending task'
- Improves visual clarity and user understanding

Status Icons Now:
- created: 📥 inbox (new/pending)
- running:  zap (active)
- paused: ⏸ pause (paused)
- completed: ✓ check (finished)
- failed: ⚠️ alert-triangle (error)
2026-01-22 11:46:43 +08:00
catlog22
e2e3d5a815 style: improve task list CSS styling and layout
Task List Styling Improvements:

1. Added .tasks-list-header styling
   - Flexbox layout with space-between alignment
   - Border bottom separator line
   - Proper heading (h4) with icon and spacing
   - Muted text color for counts

2. Added .task-list-empty styling
   - Full centered empty state container
   - Proper spacing and padding (3rem)
   - Icon styling with reduced opacity
   - Title and hint text with correct colors and sizes
   - Button margin adjustment

3. Enhanced .empty-state styling
   - Added button margin-top (1rem) for better spacing
   - Applied to both .empty-state and .empty-detail-state

Result: Task list now has consistent, professional styling with:
- Clear visual hierarchy for headers
- Properly centered empty states
- Better spacing and typography
- Improved user experience
2026-01-22 11:41:00 +08:00
catlog22
ddb7fb7d7a style: simplify loop cards and update status icons
Loop Cards:
- Remove left border accent from cards (cleaner look)
- Remove status-specific border-left colors
- Keep simple 1px border all around

Status Icons Updated:
- created: circle → square
- running: activity → zap (lightning bolt)
- paused: pause-circle → pause
- completed: check-circle-2 → check
- failed: x-circle → alert-triangle

Both renderLoopCard() and getStatusIcon() functions updated for consistency.
2026-01-22 11:33:45 +08:00
catlog22
62d5ce3f34 style: unify Loop Monitor UI design with improved clarity
Major visual improvements across all components:

Left Sidebar (Loop Cards):
- Enhanced card styling with better shadows and borders (4px left border)
- Improved hover states with subtle elevation
- Better selected state with primary color highlight
- Increased padding and spacing (1rem padding, 0.75rem margin)
- Cleaner status indicator badges

Right Panel (Detail View):
- Added background containers to all detail sections with borders
- Improved section headers with bottom borders for clear separation
- Enhanced progress items with individual card styling
- Better visual hierarchy with consistent spacing (1rem gaps)
- Added info-box component for V2 loop information

Meta Information:
- Detail-meta items now have pill-style backgrounds
- Dashed separator line for better visual grouping
- Improved spacing and padding

CLI Steps:
- Enhanced step cards with better borders and hover states
- 3px left accent border for status indication
- Smooth transitions on hover

Typography & Colors:
- Unified border-radius: 0.625rem for sections, 0.5rem for items
- Consistent background: hsl(var(--muted) / 0.25) for sections
- Better border opacity: hsl(var(--border) / 0.5) and 0.6 variants
- Improved font weights and sizes for clarity

Overall result: Cleaner, more professional interface with better visual hierarchy and clarity.
2026-01-22 11:20:16 +08:00
catlog22
15b3977e88 fix: reorganize left sidebar into 3-row layout
- Row 1: Tab buttons (循环 | 任务) + New Loop button
- Row 2: Filter dropdown (全部 / 运行中 / 已暂停 / 已完成 / 失败)
- Row 3: Loop list items

This fixes the layout issue where multiple elements were stacking vertically
and appearing on multiple lines. Now creates a clear, organized left panel.
2026-01-22 11:13:07 +08:00
catlog22
d70f02abed fix: resolve Loop Monitor UI styling issues
- Add missing i18n keys: 'loop.listView' and 'loop.addTask' for both English and Chinese
- Fix kanban board header layout: wrap title and loop name in separate container (.kanban-header-left)
- Add CSS styling for .kanban-header-left and .kanban-loop-title to properly display loop titles
- Improve visual separation between 'Tasks Board' label and loop title

This fixes the issue where loop titles were appearing inline with the 'Tasks Board' header,
making them appear jumbled (e.g., '任务看板 在' instead of '任务看板' | '在').
2026-01-22 11:07:47 +08:00
catlog22
e11c4ba8ed feat: Loop Monitor UI optimization - Phases 1-6 complete
Complete comprehensive optimization of Loop Monitor interface with 6 phases:

Phase 1: Internationalization (i18n)
- Added 28 new translation keys (English + Chinese)
- Complete dual-language support for all new features
- Coverage: kanban board, task status, navigation, priority

Phase 2: CSS Styling Optimization
- 688 lines of kanban board styling system
- Task cards, status badges, priority badges
- Drag-and-drop visual feedback
- Base responsive design

Phase 3: UI Layout Design
- Left navigation panel optimization
- Kanban board layout (4 columns: Pending, In Progress, Blocked, Done)
- Task card information architecture
- Status update flow design

Phase 4: Backend API Extensions
- New PATCH /api/loops/v2/:loopId/status endpoint for quick status updates
- Extended PUT /api/loops/v2/:loopId with metadata support (tags, priority, notes)
- Enhanced V2LoopStorage interface
- Improved validation and error handling
- WebSocket broadcasting for real-time updates

Phase 5: Frontend JavaScript Implementation
- 967 lines of interactive functionality
- View switching system (Loops ↔ Kanban)
- Kanban board rendering with 4-column layout
- Drag-and-drop functionality (HTML5 API)
- Status update functions (updateLoopStatus, updateTaskStatus, updateLoopMetadata)
- Task context menu (right-click)
- Navigation grouping by status

Phase 6: Final Optimization
- Smooth animations (@keyframes slideInUp, fadeIn, modalFadeIn, pulse)
- Enhanced responsive design (desktop, tablet, mobile)
- Full ARIA accessibility support
- Complete keyboard navigation (arrow keys, Enter/Space, Ctrl+K, ?)
- Performance optimizations (debounce, throttle, will-change)
- Screen reader support

Key Features:
 Kanban board with drag-and-drop task management
 Task status management (pending, in_progress, blocked, done)
 Loop status quick update via PATCH API
 Navigation grouping with status-based filtering
 Full keyboard navigation support
 ARIA accessibility attributes
 Responsive design (mobile, tablet, desktop)
 Smooth animations and transitions
 Internationalization (English & Chinese)
 Performance optimizations

Code Statistics:
- Total: ~1798 lines
- loop-monitor.js: +967 lines (frontend logic)
- 36-loop-monitor.css: +688 lines (styling)
- loop-v2-routes.ts: +86/-3 lines (API backend)
- i18n.js: +60 lines (translations)

Technical Stack:
- JavaScript ES6+ (frontend)
- CSS3 with animations
- TypeScript (backend)
- HTML5 Drag & Drop API
- ARIA accessibility
- Responsive design

Browser Compatibility:
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+

All TypeScript compilation tests pass. Ready for production deployment.
2026-01-22 11:01:05 +08:00
catlog22
60eab98782 feat: Add comprehensive tests for CCW Loop System flow state
- Implemented loop control tasks in JSON format for testing.
- Created comprehensive test scripts for loop flow and standalone tests.
- Developed a shell script to automate the testing of the entire loop system flow, including mock endpoints and state transitions.
- Added error handling and execution history tests to ensure robustness.
- Established variable substitution and success condition evaluations in tests.
- Set up cleanup and workspace management for test environments.
2026-01-22 10:13:00 +08:00
catlog22
d9f1d14d5e feat: add CCW Loop System for automated iterative workflow execution
Implements a complete loop execution system with multi-loop parallel support,
dashboard monitoring, and comprehensive security validation.

Core features:
- Loop orchestration engine (loop-manager, loop-state-manager)
- Multi-loop parallel execution with independent state management
- REST API endpoints for loop control (pause, resume, stop, retry)
- WebSocket real-time status updates
- Dashboard Loop Monitor view with live updates
- Security: path traversal protection and sandboxed JavaScript evaluation

Test coverage:
- 42 comprehensive tests covering multi-loop, API, WebSocket, security
- Security validation for success_condition injection attacks
- Edge case handling and end-to-end workflow tests
2026-01-21 22:55:24 +08:00
catlog22
64e064e775 feat(workflow): enhance lite-fix to support plan.json new fields (rationale, verification, risks)
- Add rationale/verification field generation for Medium severity bugs
- Add risks/code_skeleton/data_flow field support for High/Critical severity
- Update fix-plan.json requirements in cli-lite-planning-agent prompt
- Ensure executionContext includes complexity field for lite-execute consumption
- Align with plan-json-schema.json complexity-based field requirements
2026-01-21 22:35:54 +08:00
catlog22
8c1d62208e chore: bump version to 6.3.36 2026-01-21 19:50:51 +08:00
catlog22
c4960c3e84 feat: 添加基于文件的交互式假设驱动调试功能,记录探索过程和理解演变 2026-01-21 19:49:03 +08:00
catlog22
82b8fcc608 feat: 增加失败历史详情渲染功能,展示失败反馈信息 2026-01-21 18:32:52 +08:00
catlog22
a7c8ea04f1 feat: 增加失败分析功能,改进问题规划和解决方案生成 2026-01-21 17:46:22 +08:00
catlog22
2084ff3e21 fix: 增加对空设置文件的处理,确保返回空对象 2026-01-21 17:04:16 +08:00
catlog22
890ca455b2 Revert "feat: 调整主面板位置和高度以改善布局"
This reverts commit 572c103fbf.
2026-01-21 16:34:36 +08:00
catlog22
1dfabf6bda fix: resolve CodexLens installation issues by correcting package name and improving local path detection
- Updated package name from `codexlens` to `codex-lens` in all relevant files to ensure consistency with `pyproject.toml`.
- Enhanced `findLocalPackagePath()` to always search for local paths, even when running from `node_modules`.
- Removed fallback logic for PyPI installation in several functions, providing clearer error messages for local installation failures.
- Added detailed documentation on installation steps and error handling for local development packages.
- Introduced a new summary document outlining the issues and fixes related to CodexLens installation.
2026-01-21 15:32:41 +08:00
catlog22
604405b2d6 chore: bump version to 6.3.35 2026-01-21 14:39:52 +08:00
catlog22
190d2280fd feat: 更新codex-review和lite-execute命令示例,增加多种用法说明 2026-01-21 14:36:22 +08:00
catlog22
4e66864cfd chore: bump version to 6.3.34 2026-01-21 13:02:54 +08:00
catlog22
cac0566627 feat: 更新检查更新按钮的加载状态和通知功能,增加工具提示 2026-01-21 13:00:25 +08:00
catlog22
572c103fbf feat: 调整主面板位置和高度以改善布局 2026-01-21 12:40:32 +08:00
catlog22
9d6bc92837 feat: add workflow management commands and utilities
- Implemented workflow installation, listing, and syncing commands in `workflow.ts`.
- Created utility functions for project root detection and package version retrieval in `project-root.ts`.
- Added update checker functionality to notify users of new package versions in `update-checker.ts`.
- Developed unit tests for project root utilities and update checker to ensure functionality and version comparison accuracy.
2026-01-21 12:35:33 +08:00
catlog22
ffe9898fd3 feat: 增加调试日志以跟踪活动执行状态和钩子事件 2026-01-21 11:15:53 +08:00
catlog22
a602a46985 feat: 更新 LSP 测试,调整测试文件和增加分析等待时间 2026-01-21 10:57:36 +08:00
catlog22
f7dd3d23ff feat: 添加多个 LSP 测试示例,包括能力测试、调用层次和原始 LSP 测试 2026-01-21 10:43:53 +08:00
catlog22
200812d204 feat: 更新 CLI 自动调用触发器和执行原则,增强文档说明 2026-01-20 22:14:45 +08:00
catlog22
261c98549d feat: Implement association tree for LSP-based code relationship discovery
- Add `association_tree` module with components for building and processing call association trees using LSP call hierarchy capabilities.
- Introduce `AssociationTreeBuilder` for constructing call trees from seed locations with depth-first expansion.
- Create data structures: `TreeNode`, `CallTree`, and `UniqueNode` for representing nodes and relationships in the call tree.
- Implement `ResultDeduplicator` to extract unique nodes from call trees and assign relevance scores based on depth, frequency, and kind.
- Add unit tests for `AssociationTreeBuilder` and `ResultDeduplicator` to ensure functionality and correctness.
2026-01-20 22:09:04 +08:00
catlog22
b85d9b9eb1 feat(workflow): 更新 multi-cli-plan 采用 in-memory 调用模式
- Phase 4 扩展:收集执行方法和代码审查工具选项
- Phase 5 重构:构建 executionContext 并调用 lite-execute --in-memory
- 移除 IMPL_PLAN.md 生成,仅保留 plan.json
- 更新执行流程图和相关文档
- executionContext 结构与 lite-plan 保持一致
- 修改 Agent Roles 职责描述
2026-01-20 20:33:38 +08:00
catlog22
4610018193 feat(lsp): 更新 TypeScript 语言服务器命令以支持 Windows 环境 2026-01-20 15:28:18 +08:00
catlog22
9c9b1ad01c Add TypeScript LSP setup guide and enhance debugging tests
- Created a comprehensive guide for setting up TypeScript LSP in Claude Code, detailing installation methods, configuration, and troubleshooting.
- Added multiple debugging test scripts to validate LSP communication with pyright, including direct communication tests, configuration checks, and document symbol retrieval.
- Implemented error handling and logging for better visibility during LSP interactions.
2026-01-20 14:53:18 +08:00
catlog22
2f3a14e946 Add unit tests for LspGraphBuilder class
- Implement comprehensive unit tests for the LspGraphBuilder class to validate its functionality in building code association graphs.
- Tests cover various scenarios including single level graph expansion, max nodes and depth boundaries, concurrent expansion limits, document symbol caching, error handling during node expansion, and edge cases such as empty seed lists and self-referencing nodes.
- Utilize pytest and asyncio for asynchronous testing and mocking of LspBridge methods.
2026-01-20 12:49:31 +08:00
catlog22
1376dc71d9 feat(workflow): 更新 lite-lite-lite 和 tdd-plan 文档,增强描述和工具支持 2026-01-20 11:59:06 +08:00
catlog22
c1d12384c3 feat(mcp): 添加 CCW_DISABLE_SANDBOX 环境变量支持禁用工作空间访问限制
- 在 path-validator.ts 中添加 isSandboxDisabled() 函数
- 修改 validatePath() 在沙箱禁用时跳过路径限制检查
- MCP server 启动日志显示沙箱状态
- /api/mcp-install-ccw API 支持 disableSandbox 参数
- Dashboard UI 添加禁用沙箱的复选框选项
- 添加中英文 i18n 翻译支持
2026-01-20 11:50:23 +08:00
catlog22
eea859dd6f fix(cli): 修复 Windows 路径反斜杠被吞掉的问题并添加跨平台路径支持
- 重写 escapeWindowsArg 函数,正确处理反斜杠和引号转义
- 添加 escapeUnixArg 函数支持 Linux/macOS shell 转义
- 添加 normalizePathSeparators 函数自动转换路径分隔符
- 修复 vscode-lsp.ts 中的 TypeScript 类型错误
2026-01-20 09:44:49 +08:00
catlog22
3fe630f221 Add tests and documentation for CodexLens LSP tool
- Introduced a new test script for the CodexLens LSP tool to validate core functionalities including symbol search, find definition, find references, and get hover.
- Created comprehensive documentation for the MCP endpoint design, detailing the architecture, features, and integration with the CCW MCP Manager.
- Developed a detailed implementation plan for transitioning to a real LSP server, outlining phases, architecture, and acceptance criteria.
2026-01-19 23:26:35 +08:00
catlog22
eeaefa7208 feat(queue): 添加队列合并功能,支持跳过重复项并标记源队列为已合并 2026-01-19 15:35:41 +08:00
catlog22
e58c33fb6e fix(cli-history): 转义 sourceDir 以支持 onclick 处理程序 2026-01-19 12:22:33 +08:00
catlog22
6716772e0a fix(codexlens): 添加 Yarn PnP 支持以改进环境检测
问题分析:
- Yarn PnP 不使用 node_modules 目录
- 原有逻辑仅检测 node_modules 会错误识别为开发环境
- 导致在 Yarn PnP 项目中尝试使用本地路径安装失败

修复内容:
- 在 isDevEnvironment() 中添加 Yarn PnP 检测
- 检查 process.versions.pnp 属性判断是否为 Yarn PnP 环境
- Yarn PnP 环境被视为生产环境,使用 PyPI 安装

改进影响:
- npm/pnpm: 使用 node_modules 检测(原有逻辑)
- Yarn PnP: 使用 pnp 版本检测(新增逻辑)
- 开发环境: 两项检测均不满足时识别为开发环境

Based on Gemini code review suggestion (ID: 1768794060352-gemini)
2026-01-19 11:43:12 +08:00
catlog22
a8367bd4d7 fix(codexlens): 修复 npm install 后 CodexLens 配置被重置的问题
问题分析:
- npm install 时,`__dirname` 指向 node_modules 内的路径
- 使用 `pip install -e`(editable mode)会保存源码路径引用
- npm 升级后旧路径失效,导致需要删除虚拟环境才能重新安装

修复内容:
- 添加 isInsideNodeModules() 检测函数
- 添加 isDevEnvironment() 判断是否在开发环境
- 添加 findLocalPackagePath() 统一的本地包路径查找函数
- 当运行在 node_modules 中时,跳过本地路径,直接使用 PyPI 安装

影响的函数:
- bootstrapWithUv()
- installSemanticWithUv()
- bootstrapVenv()
- ensureLiteLLMEmbedderReady()

行为变化:
- 开发环境(不在 node_modules 中):使用本地路径安装(editable mode)
- 生产环境(npm install 安装):使用 PyPI 安装(稳定的包引用)
2026-01-19 11:32:50 +08:00
catlog22
ea13f9a575 fix(config): 修复测试污染用户配置的问题,支持 CCW_DATA_DIR 环境变量
修改内容:
- getGlobalConfigPath() 和 getGlobalSettingsPath() 现在尊重 CCW_DATA_DIR 环境变量
- ensureClaudeCliTools()、saveClaudeCliTools()、saveClaudeCliSettings() 同步更新
- 测试现在使用独立的临时目录,不会修改用户的生产配置文件 ~/.claude/cli-tools.json

修复问题:
- 集成测试会修改用户的 gemini primaryModel 为 test-model
- 导致后续 Codex CLI 执行时读取到错误的配置

验证:
- 所有集成测试通过 (4/4)
- 用户配置保持不变
- 生产环境默认行为不受影响
2026-01-19 11:28:06 +08:00
catlog22
7d152b7bf9 feat(doc): 添加 CLI 自动触发调用场景和执行原则 2026-01-18 19:51:00 +08:00
catlog22
16c96229f9 feat(cli): add agent_message type for precise --final output filtering
Introduce dedicated agent_message IR type to distinguish final AI responses
from generic stdout. This enables --final flag to show only agent messages,
filtering out all intermediate content (JSONL events, reasoning, tool calls).

Changes:
- Add agent_message type to CliOutputUnitType
- Update JsonLinesParser to map final responses from all tools (codex,
  gemini, claude, opencode) to agent_message type
- Add final_output field to database schema with migration
- Update getCachedOutput and getConversation to return finalOutput
- Prefer finalOutput in outputAction for --final flag

Fixes issue where --final showed raw JSONL instead of filtered content.
2026-01-18 19:49:33 +08:00
catlog22
40b003be68 fix(cli): 增强 CLI 输出处理,添加解析输出和过滤功能 2026-01-18 18:35:23 +08:00
catlog22
46111b3987 fix(cli): 更新提示格式以包含协议和模板信息 2026-01-18 14:22:36 +08:00
catlog22
f47726d43b fix(cli): 更新 CLI 流查看器的样式以确保在深色背景上文本可见性 2026-01-18 13:48:20 +08:00
catlog22
502d088c98 feat(cli): 添加交互式选择功能以选择 shell 配置文件并安装 Git Bash 修复 2026-01-18 13:03:22 +08:00
catlog22
f845e6e0ee fix(cli): 修复安全审计示例中的多行提示格式 2026-01-18 12:02:05 +08:00
catlog22
e96eed817c fix(cli): 修复多行提示的命令示例,更新为正确的用法 2026-01-18 12:01:42 +08:00
catlog22
6a6d1885d8 feat(install): 添加 Git Bash 多行提示修复功能并在卸载时询问移除
refactor(cli): 删除不再使用的 CLI 脚本和测试文件
fix(cli): 移除多行参数提示的输出
2026-01-18 11:53:49 +08:00
catlog22
a34eeb63bf feat(cli): add CLI prompt simulation and testing scripts
- Introduced `simulate-cli-prompt.js` to simulate various prompt formats and display the final content passed to the CLI.
- Added `test-shell-prompt.js` to test actual shell execution of different prompt formats, demonstrating correct vs incorrect multi-line prompt handling.
- Created comprehensive tests in `cli-prompt-parsing.test.ts` to validate prompt parsing, including single-line, multi-line, special characters, and template concatenation.
- Implemented edge case handling for empty lines, long prompts, and Unicode characters.
2026-01-18 11:10:05 +08:00
catlog22
56acc4f19c fix(cli): 修复通用提示模板格式,移除多余换行 2026-01-17 22:46:09 +08:00
catlog22
fdf468ed99 refactor(cli): 移除关于 --rule 选项的工作原理说明 2026-01-17 22:08:36 +08:00
catlog22
680c2a0597 fix(cli): allow codex review with target flags without prompt
- Skip template concatenation when using --uncommitted/--base/--commit
- Allow empty prompt for review mode with target flags
- Add hasReviewTarget check in command routing
- Update documentation with validation constraints

codex review constraint: target flags and prompt are mutually exclusive
2026-01-17 22:07:26 +08:00
catlog22
5b5dc85677 refactor(cli): change from env var injection to direct prompt concatenation
- Replace $PROTO/$TMPL environment variable injection with systemRules/roles direct concatenation
- Append rules to END of prompt instead of prepending
- Change prompt field name from RULES to CONSTRAINTS in all prompts
- Default to universal-rigorous-style template when --rule not specified
- Update all .claude documentation, agents, commands, and skills
- Add streaming_content type support for Gemini delta messages

Breaking: Prompts now use CONSTRAINTS field instead of RULES
2026-01-17 21:30:05 +08:00
catlog22
1e691fa751 feat(cli): default to universal-rigorous-style template when --rule not specified
- Add default template fallback in cli.ts (effectiveRule)
- Update cli-tools-usage.md with English descriptions
- Add ACE semantic search to Pattern Discovery Workflow
- Simplify Template System documentation (list template names only)
- Filter CLI progress messages (auth, loading) in output converter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:51:21 +08:00
catlog22
1f87ca0be3 refactor(routes): 更新 rules-routes 和 claude-routes 使用 $PROTO $TMPL
- rules-routes.ts: 替换 4 处 $(cat ...) 模板引用为 $PROTO $TMPL
- claude-routes.ts: 替换 2 处 $(cat ...) 模板引用为 $PROTO $TMPL
- 添加 loadProtocol/loadTemplate 导入
- 在 executeCliTool 调用中添加 rulesEnv 参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:40:28 +08:00
catlog22
f14418603a feat(cli): 添加 --rule 选项支持模板自动发现
重构 ccw cli 模板系统:

- 新增 template-discovery.ts 模块,支持扁平化模板自动发现
- 添加 --rule <template> 选项,自动加载 protocol 和 template
- 模板目录从嵌套结构 (prompts/category/file.txt) 迁移到扁平结构 (prompts/category-function.txt)
- 更新所有 agent/command 文件,使用 $PROTO $TMPL 环境变量替代 $(cat ...) 模式
- 支持模糊匹配:--rule 02-review-architecture 可匹配 analysis-review-architecture.txt

其他更新:
- Dashboard: 添加 Claude Manager 和 Issue Manager 页面
- Codex-lens: 增强 chain_search 和 clustering 模块

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:20:24 +08:00
catlog22
1fae35c05d docs: 添加 Semantic CLI Invocation 实践说明 2026-01-17 11:44:27 +08:00
catlog22
8523079a99 docs: 更新 ACE Tool 配置文档 2026-01-17 11:40:30 +08:00
catlog22
4daeb0eead docs: 打字机动画增加 OpenCode 2026-01-17 11:36:03 +08:00
catlog22
86548af518 docs: 修复语义CLI和文档表格居中
- 添加 div align center 包裹 Semantic CLI Invocation 表格
- 添加 div align center 包裹 Documentation 表格
- 同步更新中英文 README 文件
2026-01-17 11:35:10 +08:00
catlog22
4e5eb6cd40 docs: 修复核心特性表格居中 2026-01-17 11:28:31 +08:00
catlog22
021ce619f0 docs: 表格居中对齐 2026-01-17 11:26:02 +08:00
catlog22
63aaab596c docs: 统一简约风格
- 徽章改为 flat-square 风格
- 移除表格内所有 emoji 图标
- 保留章节标题图标
- 统一色彩方案
2026-01-17 11:23:38 +08:00
catlog22
bc52af540e docs: 重新设计酷炫主页
- 添加渐变动画 Header (capsule-render)
- 添加打字动画效果 (typing-svg)
- 使用 for-the-badge 风格徽章
- 添加 Stars/Forks/Issues 统计
- 使用 HTML 表格优化布局
- 添加快速导航按钮
- 使用折叠面板整理长内容
- 添加渐变动画 Footer
2026-01-17 11:17:33 +08:00
catlog22
8bbbdc61eb docs: 修复标题居中和 CLI 链接
- 标题移入 div align=center
- 修正 CLI 官方链接:
  - Gemini: google-gemini/gemini-cli
  - Codex: openai/codex
  - OpenCode: opencode-ai/opencode
  - Qwen: QwenLM
2026-01-17 11:09:23 +08:00
catlog22
fd5f6c2c97 docs: 简化 CLI 工具安装说明
- 移除详细配置步骤
- 使用表格形式简明展示
- 提供官方文档链接
2026-01-17 11:06:21 +08:00
catlog22
fd145c34cd docs: 优化自定义 CLI 注册说明
- 明确通过 Dashboard 界面注册
- 简化配置说明为表格形式
- 强调注册一次永久语义调用
2026-01-17 11:05:30 +08:00
catlog22
10b3ace917 docs: 添加自定义 CLI 注册说明
- 通过 API Settings 注册任意 API 为自定义 CLI
- 注册后可语义调用自定义 CLI
- 支持自定义 CLI 与内置 CLI 协同编排
2026-01-17 11:02:20 +08:00
catlog22
d6a2e0de59 docs: 添加语义化 CLI 调用说明
- 用户语义指定 CLI 工具,系统自动调用
- 支持协同、并行、迭代、流水线等编排模式
- 示例:'使用 Gemini 和 Codex 协同分析'
2026-01-17 11:01:29 +08:00
catlog22
35c6605681 docs: 简化 ACE Tool 配置为链接形式
- 官方文档: docs.augmentcode.com
- 代理版本: github.com/eastxiaodong/ace-tool
2026-01-17 10:50:35 +08:00
catlog22
ef2229b0bb docs: 更新 README.md 添加符号和 CLI 工具安装指南
- 添加 emoji 符号丰富视觉效果
- 添加 Gemini/Codex/OpenCode/Qwen CLI 安装说明
- 添加 ACE Tool 配置(官方和代理方式)
- 添加 CodexLens 开发状态说明
- Dashboard 功能表格化展示
- 与中文版 README_CN.md 结构保持一致
2026-01-17 10:44:41 +08:00
catlog22
b65977d8dc docs: 更新 README_CN.md 添加 CLI 工具安装指南和 CodexLens 说明
- 添加 Gemini/Codex/OpenCode/Qwen CLI 安装说明
- 添加 ACE Tool 配置(官方和代理方式)
- 添加 CodexLens 开发状态说明
- 精简文档结构与英文版保持一致
- 更新 4 级工作流系统说明
2026-01-17 10:42:38 +08:00
catlog22
bc4176fda0 docs: consolidate documentation with 4-level workflow guide
- Add WORKFLOW_GUIDE.md (EN) and WORKFLOW_GUIDE_CN.md (CN)
- Simplify README.md to highlight 4-level workflow system
- Remove redundant docs: MCP_*.md, WORKFLOW_DECISION_GUIDE*.md, WORKFLOW_DIAGRAMS.md
- Move COMMAND_SPEC.md to docs/
- Move codex_mcp.md, CODEX_LENS_AUTO_HYBRID.md to codex-lens/docs/
- Delete temporary debug documents and outdated files

Root directory: 28 → 14 MD files
2026-01-17 10:38:06 +08:00
catlog22
464f3343f3 chore: bump version to 6.3.33 2026-01-16 15:50:32 +08:00
catlog22
bb6cf42df6 fix: 更新 issue 执行文档,明确队列 ID 要求和用户交互流程 2026-01-16 15:49:26 +08:00
catlog22
0f0cb7e08e refactor: 优化 brainstorm 上下文溢出保护文档
- conceptual-planning-agent.md: 34行 → 10行(-71%)
- auto-parallel.md: 42行 → 9行(-79%)
- 消除重复定义,workflow 引用 agent 限制
- 移除冗余的策略列表、自检清单、代码示例
- 保留核心功能:限制数字、简要策略、恢复方法
2026-01-16 15:36:59 +08:00
catlog22
39d070eab6 fix: resolve GitHub issues (#50, #54)
- #54: Add API endpoint configuration documentation to DASHBOARD_GUIDE.md
- #50: Add brainstorm context overflow protection with output size limits

Note: #72 and #53 not changed per user feedback - existing behavior is sufficient
(users can configure envFile themselves; default Python version is appropriate)
2026-01-16 15:09:31 +08:00
catlog22
9ccaa7e2fd fix: 更新 CLI 工具配置缓存失效逻辑 2026-01-16 14:28:10 +08:00
catlog22
eeb90949ce chore: bump version to 6.3.32
- Fix: Dashboard project overview display issue (#80)
- Refactor: Update project structure to use project-tech.json
2026-01-16 14:09:09 +08:00
catlog22
7b677b20fb fix: 更新项目文档,修正项目上下文和学习固化流程描述 2026-01-16 14:01:27 +08:00
catlog22
e2d56bc08a refactor: 更新项目结构,替换 project.json 为 project-tech.json,添加新架构和技术分析 2026-01-16 13:33:38 +08:00
catlog22
d515090097 feat: add --mode review support for codex CLI
- Add 'review' to mode enum in ParamsSchema and schema
- Implement codex review subcommand in buildCommand (uses --uncommitted by default)
- Other tools (gemini/qwen/claude) accept review mode but no operation change
- Update cli-tools-usage.md with review mode documentation
2026-01-16 13:01:02 +08:00
catlog22
d81dfaf143 fix: add cross-platform support for hook installation (#82)
- Add PlatformUtils module for platform detection (Windows/macOS/Linux)
- Add escapeForShell() for platform-specific shell escaping
- Add checkCompatibility() to warn about incompatible hooks before install
- Add getVariant() to support platform-specific template variants
- Fix node -e commands: use double quotes on Windows, single quotes on Unix
2026-01-16 12:54:56 +08:00
catlog22
d7e5ee44cc fix: adapt help-routes.ts to new command.json structure (fixes #81)
- Replace getIndexDir() with getCommandFilePath() to find command.json
- Update file watcher to monitor command.json instead of index/ directory
- Modify API routes to read from unified command.json structure
- Add buildWorkflowRelationships() to dynamically build workflow data from flow fields
- Add /api/help/agents endpoint for agents list
- Add category merge logic for frontend compatibility (cli includes general)
- Add cli-init command to command.json
2026-01-16 12:46:50 +08:00
catlog22
dde39fc6f5 fix: 更新 CLI 调用后说明,移除不必要的轮询建议 2026-01-16 09:40:21 +08:00
catlog22
9b4fdc1868 Refactor code structure for improved readability and maintainability 2026-01-15 22:43:44 +08:00
catlog22
623afc1d35 6.3.31 2026-01-15 22:30:57 +08:00
catlog22
085652560a refactor: 移除 ccw cli 内部超时参数,改由外部 bash 控制
- 移除 --timeout 命令行选项和内部超时处理逻辑
- 进程生命周期跟随父进程(bash)状态
- 简化代码,超时控制交由外部调用者管理
2026-01-15 22:30:22 +08:00
catlog22
af4ddb1280 feat: 添加队列和议题删除功能,支持归档议题 2026-01-15 19:58:54 +08:00
catlog22
7db659f0e1 feat: 增强议题搜索功能与多队列卡片界面优化
搜索增强:
- 添加防抖处理修复快速输入导致页面卡死的问题
- 扩展搜索范围至解决方案的描述和方法字段
- 新增搜索结果高亮显示匹配关键词
- 添加搜索下拉建议,支持键盘导航

多队列界面:
- 优化队列展开视图的卡片布局使用CSS Grid
- 添加取消激活队列功能及API端点
- 改进状态颜色分布和统计卡片样式
- 添加激活/取消激活按钮的中文国际化

修复:
- 修复路由冲突导致的deactivate 404错误
- 修复异步加载后拖拽排序失效的问题
2026-01-15 19:44:44 +08:00
catlog22
ba526ea09e fix: 修复 Dashboard 概况页面无法显示项目信息的问题
添加 extractStringArray 辅助函数来处理混合数组类型(字符串数组和对象数组),
使 loadProjectOverview 函数能够正确处理 project-tech.json 中的数据结构。

修复的字段包括:
- languages: 对象数组 [{name, file_count, primary}] → 字符串数组
- frameworks: 保持兼容字符串数组
- key_components: 对象数组 [{name, description, path}] → 字符串数组
- layers/patterns: 保持兼容混合类型

Closes #79
2026-01-15 18:58:42 +08:00
catlog22
c308e429f8 feat: 添加增量更新命令以支持单文件索引更新 2026-01-15 18:14:51 +08:00
catlog22
c24ed016cb feat: 更新执行命令文档,添加队列ID要求和用户提示功能 2026-01-15 16:22:48 +08:00
catlog22
0c9a6d4154 chore: bump version to 6.3.29
Release 6.3.29 with:
- Multi-CLI task and discussion tabs i18n support
- Collapsible sections for discussion and summary tabs
- Post-Completion Expansion for execution commands
- Enhanced multi-CLI session handling
- Code structure refactoring
2026-01-15 15:38:15 +08:00
catlog22
7b5c3cacaa feat: 添加多CLI任务和讨论标签的国际化支持 2026-01-15 15:35:09 +08:00
catlog22
e6e7876b38 feat: Add collapsible sections and enhance layout for discussion and summary tabs 2026-01-15 15:30:11 +08:00
catlog22
0eda520fd7 feat: Enhance multi-CLI session handling and UI updates
- Added loading of plan.json in scanMultiCliDir to improve task extraction.
- Implemented normalization of tasks from plan.json format to support new UI.
- Updated CSS for multi-CLI plan summary and task item badges for better visibility.
- Refactored hook-manager to use Node.js for cross-platform compatibility in command execution.
- Improved i18n support for new CLI tool configuration in the hook wizard.
- Enhanced lite-tasks view to utilize normalized tasks and provide better fallback mechanisms.
- Updated memory-update-queue to return string messages for better integration with hooks.
2026-01-15 15:20:20 +08:00
catlog22
e22b525e9c feat: add Post-Completion Expansion to execution commands
执行命令完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 /issue:new
2026-01-15 13:00:50 +08:00
catlog22
86536aaa10 Refactor code structure for improved readability and maintainability 2026-01-15 11:51:19 +08:00
catlog22
3ef766708f chore: bump version to 6.3.28
Fixes #74 - Include ccw/scripts/ in npm package files
2026-01-15 11:20:34 +08:00
catlog22
95a7f05aa9 Add unified command indices for CCW and CCW-Help with detailed capabilities, flows, and intent rules
- Introduced command.json for CCW-Help with 88 commands and 16 agents, covering essential workflows and memory management.
- Created command.json for CCW with comprehensive capabilities for exploration, planning, execution, bug fixing, testing, reviewing, and documentation.
- Defined complex flows for rapid iteration, full exploration, coupled planning, bug fixing, issue lifecycle management, and more.
- Implemented intent rules for bug fixing, issue batch processing, exploration, UI design, TDD, review, and documentation.
- Established CLI tools and injection rules to enhance command execution based on context and complexity.
2026-01-15 11:19:30 +08:00
catlog22
f692834153 fix: Status导航项现在正确显示CLI状态页面而非CLAUDE.md管理器
cli-manager视图路由错误调用了renderClaudeManager(),修复为调用正确的renderCliManager()函数。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:38:19 +08:00
catlog22
a228bb946b fix: Issue Manager completed过滤器现在可以显示归档议题
- 添加 loadIssueHistory() 函数从 /api/issues/history 加载归档议题
- 修改 filterIssuesByStatus() 在选择 completed 过滤器时加载历史数据
- 修改 renderIssueView() 合并当前已完成议题和归档议题
- 修改 renderIssueCard() 显示 "Archived" 标签区分归档议题
- 修改 openIssueDetail() 支持从缓存加载归档议题详情
- 添加 .issue-card.archived 和 .issue-archived-badge CSS样式

Fixes: https://github.com/catlog22/Claude-Code-Workflow/issues/76

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:28:52 +08:00
catlog22
4d57f47717 feat: 更新搜索工具优先级指南,统一格式以提高可读性 2026-01-14 22:00:01 +08:00
catlog22
c8cac5b201 feat: 添加搜索工具优先级指南,优化CLI工具调用和执行策略 2026-01-14 21:46:36 +08:00
catlog22
f9c1216eec feat: 添加令牌消耗诊断功能,优化输出和状态管理 2026-01-14 21:40:00 +08:00
catlog22
266f6f11ec feat: Enhance documentation diagnosis and category mapping
- Introduced action to diagnose documentation structure, identifying redundancies and conflicts.
- Added centralized category mappings in JSON format for improved detection and strategy application.
- Updated existing functions to utilize new mappings for taxonomy and strategy matching.
- Implemented new detection patterns for documentation redundancy and conflict.
- Expanded state schema to include documentation diagnosis results.
- Enhanced severity criteria and strategy selection guide to accommodate new documentation issues.
2026-01-14 21:07:52 +08:00
catlog22
1f5ce9c03a Enhance CCW Orchestrator with Requirement Analysis Features
- Updated SKILL.md to reflect new requirement analysis capabilities, including input analysis and clarity scoring.
- Expanded issue workflow in issue.md to include discovery and creation phases, along with detailed command references.
- Introduced requirement analysis specification in requirement-analysis.md, outlining clarity scoring, dimension extraction, and validation processes.
- Added output templates specification in output-templates.md for consistent user experience across classification, planning, clarification, execution, and summary outputs.
2026-01-14 20:15:42 +08:00
catlog22
959d60b31f Enhance CLI Stream Viewer and Navigation Lifecycle Management
- Added lifecycle management for CLI Stream Viewer with destroy function to clean up event listeners and timers.
- Improved navigation state management by registering destroy functions for views and ensuring cleanup on transitions.
- Updated Claude Manager to include lifecycle functions for better resource management.
- Enhanced CLI History View with state reset functionality and improved dropdown handling for batch delete.
- Introduced round solutions rendering in Lite Tasks View, including collapsible sections for implementation plans, dependencies, and technical concerns.
2026-01-14 19:57:05 +08:00
catlog22
49845fe1ae feat: 扩展多CLI详细页面样式,更新任务卡片和决策状态显示 2026-01-14 18:47:23 +08:00
catlog22
aeb111420e feat: 添加多CLI计划支持,更新数据聚合和导航组件以处理新任务类型 2026-01-14 17:06:36 +08:00
catlog22
6ff3e5f8fe test: add unit tests for hook quoting fix (Issue #73)
Add comprehensive test suite for convertToClaudeCodeFormat function:
- Verify bash -c commands use single quotes
- Verify jq patterns are preserved without excessive escaping
- Verify single quotes in scripts are properly escaped
- Test all real-world hook templates (danger-*, ccw-notify, log-tool)
- Test edge cases (non-bash commands, already formatted data)

All 13 tests passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:22:52 +08:00
catlog22
d941166d84 fix: use single quotes for bash -c script to avoid jq escaping issues
Problem:
When generating hook configurations, the convertToClaudeCodeFormat function
was using double quotes to wrap bash -c script arguments. This caused
complex escaping issues with jq commands inside, leading to parse errors
like "jq: error: syntax error, unexpected end of file".

Solution:
For bash -c commands, now use single quotes to wrap the script argument.
Single quotes prevent shell expansion, so internal double quotes (like
those used in jq patterns) work naturally without excessive escaping.

If the script contains single quotes, they are properly escaped using
the '\'' pattern (close quote, escaped quote, reopen quote).

Fixes: https://github.com/catlog22/Claude-Code-Workflow/issues/73

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 15:07:04 +08:00
catlog22
ac9ba5c7e4 feat: 更新CLI分析调用部分,强调等待结果和价值评估,移除背景执行默认设置 2026-01-14 14:00:14 +08:00
catlog22
9e55f51501 feat: 添加需求分析功能,支持维度拆解、覆盖度评估和歧义检测 2026-01-14 13:42:57 +08:00
catlog22
43b8cfc7b0 feat: 添加CLI辅助意图分类和行动规划功能,增强复杂输入处理和执行策略优化 2026-01-14 13:23:22 +08:00
catlog22
633d918da1 Add quality gates and tuning strategies documentation
- Introduced quality gates specification for skill tuning, detailing quality dimensions, scoring, and gate definitions.
- Added comprehensive tuning strategies for various issue categories, including context explosion, long-tail forgetting, data flow, and agent coordination.
- Created templates for diagnosis reports and fix proposals to standardize documentation and reporting processes.
2026-01-14 12:59:13 +08:00
catlog22
6b4b9b0775 feat: enhance multi-CLI planning with new schema for solutions and implementation plans; improve file handling with async methods 2026-01-14 12:15:42 +08:00
catlog22
360d29d7be Enhance server routing to include dialog API endpoints
- Updated system routes in the server to handle dialog-related API requests.
- Added support for new dialog routes under the '/api/dialog/' path.
2026-01-14 10:51:23 +08:00
catlog22
4fe7f6cde6 feat: enhance CLI discussion agent and multi-CLI planning with JSON string support; improve error handling and internationalization 2026-01-13 23:51:46 +08:00
catlog22
6922ca27de Add Multi-CLI Plan feature and corresponding JSON schema
- Introduced a new navigation item for "Multi-CLI Plan" in the dashboard template.
- Created a new JSON schema for "Multi-CLI Discussion Artifact" to facilitate structured discussions and decision-making processes.
2026-01-13 23:46:15 +08:00
catlog22
c3da637849 feat(workflow): add multi-CLI collaborative planning command
- Introduced a new command `/workflow:multi-cli-plan` for collaborative planning using ACE semantic search and iterative analysis with Claude and Codex.
- Implemented a structured execution flow with phases for context gathering, multi-tool analysis, user decision points, and final plan generation.
- Added detailed documentation outlining the command's usage, execution phases, and key features.
- Included error handling and configuration options for enhanced user experience.
2026-01-13 23:23:09 +08:00
catlog22
2f1c56285a chore: bump version to 6.3.27
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:51:10 +08:00
catlog22
85972b73ea feat: update CSRF protection logic and enhance GPU detection method; improve i18n for hook wizard templates 2026-01-13 21:49:08 +08:00
catlog22
6305f19bbb chore: bump version to 6.3.26
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:33:24 +08:00
catlog22
275d2cb0af feat: Add environment file support for CLI tools
- Introduced a new input group for environment file configuration in the dashboard CSS.
- Updated hook manager to queue CLAUDE.md updates with configurable threshold and timeout.
- Enhanced CLI manager view to include environment file input for built-in tools (gemini, qwen).
- Implemented environment file loading mechanism in cli-executor-core, allowing custom environment variables.
- Added unit tests for environment file parsing and loading functionalities.
- Updated memory update queue to support dynamic configuration of threshold and timeout settings.
2026-01-13 21:31:46 +08:00
catlog22
d5f57d29ed feat: add issue discovery by prompt command with Gemini planning
- Introduced `/issue:discover-by-prompt` command for user-driven issue discovery.
- Implemented multi-agent exploration with iterative feedback loops.
- Added ACE semantic search for context gathering and cross-module comparison capabilities.
- Enhanced user experience with natural language input and adaptive exploration strategies.

feat: implement memory update queue tool for batching updates

- Created `memory-update-queue.js` for managing CLAUDE.md updates.
- Added functionality for queuing paths, deduplication, and auto-flushing based on thresholds and timeouts.
- Implemented methods for queue status retrieval, flushing, and timeout checks.
- Configured to store queue data persistently in `~/.claude/.memory-queue.json`.
2026-01-13 21:04:45 +08:00
catlog22
7d8b13f34f feat(mcp): add cross-platform MCP config support with Windows cmd /c auto-fix
- Add buildCrossPlatformMcpConfig() helper for automatic Windows cmd /c wrapping
- Add checkWindowsMcpCompatibility() to detect configs needing Windows fixes
- Add autoFixWindowsMcpConfig() to automatically fix incompatible configs
- Add showWindowsMcpCompatibilityWarning() dialog for user confirmation
- Simplify recommended MCP configs (ace-tool, chrome-devtools, exa) using helper
- Auto-detect and prompt when adding MCP servers with npx/npm/node/python commands
- Add i18n translations for Windows compatibility warnings (en/zh)

Supported commands for auto-detection: npx, npm, node, python, python3, pip, pip3, pnpm, yarn, bun

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:07:11 +08:00
catlog22
340137d347 fix: resolve GitHub issues #63, #66, #67, #68, #69, #70
- #70: Fix API Key Tester URL handling - normalize trailing slashes before
  version suffix detection to prevent double-slash URLs like //models
- #69: Fix memory embedder ignoring CodexLens config - add error handling
  for CodexLensConfig.load() with fallback to defaults
- #68: Fix ccw cli using wrong Python environment - add getCodexLensVenvPython()
  to resolve correct venv path on Windows/Unix
- #67: Fix LiteLLM API Provider test endpoint - actually test API key connection
  instead of just checking ccw-litellm installation
- #66: Fix help-routes.ts path configuration - use correct 'ccw-help' directory
  name and refactor getIndexDir to pure function
- #63: Fix CodexLens install state refresh - add cache invalidation after
  config save in codexlens-manager.js

Also includes targeted unit tests for the URL normalization logic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:20:54 +08:00
catlog22
61cef8019a chore: bump version to 6.3.25
- Add review-code skill with multi-dimensional code review
- Externalized rules configuration (specs/rules/*.json)
- Centralized state management module

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:14:07 +08:00
catlog22
08308aa9ea feat: 增加对 HTML 标签的支持,扩展 BBCode 转换规则 2026-01-13 16:58:24 +08:00
catlog22
94ae9e264c Add output preview phase and callout types specifications
- Implemented Phase 4: Output & Preview for text formatter, including saving formatted content, generating statistics, and providing HTML preview.
- Created callout types documentation with detection patterns and conversion rules for BBCode and HTML.
- Added element mapping specifications detailing detection patterns and conversion matrices for various Markdown elements.
- Established format conversion rules for BBCode and Markdown, emphasizing pixel-based sizing and supported tags.
- Developed BBCode template with structured document and callout templates for consistent formatting.
2026-01-13 16:53:25 +08:00
catlog22
549e6e70e4 chore: bump version to 6.3.24
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:01:08 +08:00
catlog22
15514c8f91 Add multi-dimensional code review rules for architecture, correctness, performance, readability, security, and testing
- Introduced architecture rules to detect circular dependencies, god classes, layer violations, and mixed concerns.
- Added correctness rules focusing on null checks, empty catch blocks, unreachable code, and type coercion.
- Implemented performance rules addressing nested loops, synchronous I/O, memory leaks, and unnecessary re-renders in React.
- Created readability rules to improve function length, variable naming, deep nesting, magic numbers, and commented code.
- Established security rules to identify XSS risks, hardcoded secrets, SQL injection vulnerabilities, and insecure random generation.
- Developed testing rules to enhance test quality, coverage, and maintainability, including missing assertions and error path testing.
- Documented the structure and schema for rule files in the index.md for better understanding and usage.
2026-01-13 14:53:20 +08:00
catlog22
29c8bb7a66 feat: Add orchestrator and state management for code review process
- Implemented orchestrator logic to manage code review phases, including state reading, action selection, and execution loop.
- Defined state schema for review process, including metadata, context, findings, and execution tracking.
- Created action catalog detailing actions for context collection, quick scan, deep review, report generation, and completion.
- Established error recovery strategies and termination conditions for robust review handling.
- Developed issue classification and quality standards documentation to guide review severity and categorization.
- Introduced review dimensions with detailed checklists for correctness, security, performance, readability, testing, and architecture.
- Added templates for issue reporting and review reports to standardize output and improve clarity.
2026-01-13 14:39:16 +08:00
catlog22
76f5311e78 Refactor: Remove outdated security requirements and best practice templates
- Deleted security requirements specification file to streamline documentation.
- Removed best practice finding template to enhance clarity and focus on critical issues.
- Eliminated report template and security finding template to reduce redundancy and improve maintainability.
- Updated skill generator templates to enforce mandatory prerequisites for better compliance with design standards.
- Bumped package version from 6.3.18 to 6.3.23 for dependency updates.
2026-01-13 13:58:41 +08:00
catlog22
ca6677149a chore: bump version to 6.3.23
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 13:04:49 +08:00
catlog22
880376aefc feat: 优化 Solution ID 命名机制并添加 GitHub 链接显示
- Solution ID 改用 4 位随机 uid (如 SOL-GH-123-a7x9) 避免多次规划时覆盖
- issue 卡片添加 GitHub 链接图标,支持点击跳转到对应 issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 13:03:51 +08:00
catlog22
a20f81d44a fix: 兼容 discovery-state.json 新旧两种格式
- readDiscoveryProgress: 自动检测 perspectives 格式(对象数组/字符串数组)
- readDiscoveryIndex: 兼容从 perspectives 和 metadata.perspectives 提取视角
- 列表 API: 优先从 results 对象提取统计数据,回退到顶层字段
- 新增 3 个测试用例验证新格式兼容性
- bump version to 6.3.22

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 12:35:15 +08:00
catlog22
a8627e7f68 chore: bump version to 6.3.21
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:44:15 +08:00
catlog22
4caa622942 fix: 使用 csrfFetch 替换 fetch 以增强 API 请求的安全性 2026-01-13 11:42:28 +08:00
github-actions[bot]
6b8e73bd32 chore: update visual test baselines [skip ci] 2026-01-13 03:39:20 +00:00
catlog22
68c4c54b64 fix: 添加 workflow contents:write 权限以支持基准快照提交
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:38:07 +08:00
catlog22
1dca4b06a2 fix: 修复 CI 环境视觉测试跨平台兼容性问题
- 增加 visual-tester 支持尺寸不匹配时的区域提取比较
- CI 环境使用 5% 容差(本地保持 0.1%)
- 添加 workflow_dispatch 支持手动更新基准快照
- 更新后的基准快照会自动提交到仓库

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:33:11 +08:00
catlog22
a8ec42233f chore: bump version to 6.3.20
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:14:46 +08:00
catlog22
49a7c17ba8 docs: 添加提交语言规范,支持中文和英文提交信息选择 2026-01-13 11:12:59 +08:00
catlog22
8a15e08944 feat: 增强索引树构建逻辑,支持递归检查子目录中的可索引文件 2026-01-13 11:08:48 +08:00
catlog22
8c2d39d517 feat: 添加配置选项以调整重排序模型的权重和测试文件惩罚,增强语义搜索功能 2026-01-13 10:44:26 +08:00
catlog22
bf06f4ddcc feat: 添加GitHub回复任务,支持在问题存在github_url时自动评论 2026-01-13 09:58:55 +08:00
catlog22
28645aa4e4 fix: 更新API基础URL验证逻辑,允许HTTP协议并调整Anthropic API请求格式 2026-01-13 09:47:19 +08:00
catlog22
cdcb517bc2 fix: 移除未使用的类型导出,清理代码 2026-01-13 09:27:35 +08:00
catlog22
a63d547856 fix: remove duplicate RotationEndpointConfig export
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:56:04 +08:00
catlog22
d994274023 chore: bump version to 6.3.19
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:53:58 +08:00
catlog22
a98db07731 chore(release): v6.3.19 - Dense Reranker, CLI Tools & Issue Workflow
## Documentation Updates
- Update all version references to v6.3.19
- Add Dense + Reranker search documentation
- Add OpenCode AI CLI tool integration docs
- Add Issue workflow (plan → queue → execute) with Codex recommendation
- Update CHANGELOG with complete v6.3.19 release notes

## Features
- Cross-Encoder reranking for improved search relevance
- OpenCode CLI tool support
- Issue multi-queue parallel execution
- Service architecture improvements (cache-manager, preload-service)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:51:16 +08:00
catlog22
908a745f95 Refactor Codex Lens config handling and CLI tools status checks
- Updated Codex Lens config handler to extract embeddings data from the new response structure, including coverage percentage and total files with embeddings.
- Enhanced CLI tools status function to handle different tool types (builtin, cli-wrapper, api-endpoint) with improved logic for checking availability based on configuration.
- Removed obsolete test files and directories that are no longer needed.
2026-01-12 22:49:30 +08:00
catlog22
5259bf48b2 feat: 添加服务模块到加载顺序,优化工作区状态加载逻辑,支持预加载和直接获取 2026-01-12 22:31:32 +08:00
catlog22
ecaa011502 feat: 增强 CLI 状态管理,支持从缓存加载状态并优化预加载服务 2026-01-12 22:22:21 +08:00
catlog22
65cb5beec4 feat: 优化缓存管理,增加从缓存读取 CLI 状态和配置的功能 2026-01-12 21:57:21 +08:00
catlog22
fd9c55162d feat: 添加服务模块,包含缓存管理、事件管理和预加载服务 2026-01-12 21:47:11 +08:00
catlog22
ca77c114dd feat: 更新 CodexLens 项目状态获取逻辑,使用 'projects show' 命令并添加索引状态检查 2026-01-12 21:10:01 +08:00
catlog22
5282551277 feat: 更新 CodexLens 工作区状态 API,支持通过查询参数指定项目路径 2026-01-12 21:00:50 +08:00
catlog22
76e1f855f1 feat: 添加动态批处理大小设置及相关国际化支持,优化配置管理 2026-01-12 20:03:14 +08:00
catlog22
57173c9b02 feat: 优化动态批量大小计算,确保使用所有解析规则的最大字符限制,并调整利用率因子的安全范围 2026-01-12 17:47:19 +08:00
catlog22
90a1321aac feat: 添加动态批量大小计算,优化嵌入管理和配置系统 2026-01-12 17:34:37 +08:00
catlog22
b360e0edc7 feat: 委托 ensureLiteLLMEmbedderReady 以确保依赖一致性,优化 ccw-litellm 安装逻辑 2026-01-12 15:12:56 +08:00
catlog22
5ec9ad01a3 feat: 添加 ccw-litellm 安装和卸载后的缓存失效处理,确保数据更新 2026-01-12 14:39:37 +08:00
catlog22
96f0d2a8f1 feat: 更新 ccw-litellm 安装逻辑,仅检查 CodexLens 虚拟环境,移除系统 pip 回退 2026-01-12 14:18:45 +08:00
catlog22
cba4d76b75 feat: 优化 ccw-litellm 安装和卸载流程,优先使用 CodexLens 虚拟环境 2026-01-12 13:00:48 +08:00
catlog22
09beb84586 feat: 添加 UV 管理器支持以优化 SPLADE 安装流程 2026-01-12 12:54:22 +08:00
catlog22
7803dad430 Add integration and unit tests for CodexLens UV installation and UV manager
- Implemented integration tests for CodexLens UV installation functionality, covering package installations, Python import verification, and dependency conflict resolution.
- Created unit tests for the uv-manager utility module, including UV binary detection, installation, and virtual environment management.
- Added cleanup procedures for temporary directories used in tests.
- Verified the functionality of the UvManager class, including virtual environment creation, package installation, and error handling for invalid environments.
2026-01-12 12:42:38 +08:00
catlog22
52c510501d feat: 添加工具类型和用法说明,支持自定义 API 头部设置 2026-01-12 11:41:04 +08:00
catlog22
bdd545727b feat: 更新 LiteLLM 客户端和 CLI 设置管理,支持自定义 API 路由和 CLI 工具集成 2026-01-12 10:28:42 +08:00
catlog22
1044886e7d feat(cli-manager): add CLI wrapper endpoints management and UI integration
- Introduced functions to load and toggle CLI wrapper endpoints from the API.
- Updated the CLI manager UI to display and manage CLI wrapper endpoints.
- Removed CodexLens and Semantic Search from the tools section, now managed in their dedicated pages.

feat(codexlens-manager): move File Watcher card to the CodexLens Manager page

- Relocated the File Watcher card from the right column to the main content area of the CodexLens Manager page.

refactor(claude-cli-tools): enhance CLI tools configuration and migration

- Added support for new tool types: 'cli-wrapper' and 'api-endpoint'.
- Updated migration logic to handle new tool types and preserve endpoint IDs.
- Deprecated previous custom endpoint handling in favor of the new structure.

feat(cli-executor-core): integrate CLI settings for custom endpoint execution

- Implemented execution logic for custom CLI封装 endpoints using settings files.
- Enhanced error handling and output logging for CLI executions.
- Updated tool identification logic to support both built-in tools and custom endpoints.
2026-01-12 09:35:05 +08:00
catlog22
cefb934a2c feat: 为 skill-generator 添加脚本执行能力
- 默认创建 scripts/ 目录用于存放确定性脚本
- 新增 specs/scripting-integration.md 脚本集成规范
- 新增 templates/script-python.md 和 script-bash.md 脚本模板
- 模板中添加 ## Scripts 声明和 ExecuteScript 调用示例
- 支持命名即ID、扩展名即运行时的约定
- 参数自动转换: snake_case → kebab-case
- Bash 模板使用 jq 构建 JSON 输出

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 23:14:00 +08:00
catlog22
37614a3362 feat: 更新 SmartContentFormatter,确保格式化内容始终返回可显示的字符串 2026-01-11 22:37:44 +08:00
catlog22
7f3033b1c1 feat: 使用智能内容格式化器优化 CLI 输出内容格式 2026-01-11 21:17:20 +08:00
catlog22
7387a25d65 feat: 引入智能内容格式化器以优化 CLI 输出的格式化处理 2026-01-11 20:57:32 +08:00
catlog22
e1eafede65 feat: 优化 CLI 工具配置管理,动态加载工具并简化配置路径 2026-01-11 20:40:51 +08:00
catlog22
9d7b77059f feat: 删除 CLI 工具配置文件,简化项目结构 2026-01-11 19:59:16 +08:00
catlog22
7519603fbd feat: 更新 CLI 工具配置管理,优化配置读取和保存策略 2026-01-11 19:58:48 +08:00
catlog22
bafc3225d2 feat: 更新 CLI 工具执行规范,重构配置和选择流程 2026-01-11 19:53:56 +08:00
catlog22
174393b5cb feat: 添加预加载功能以优化 CodexLens 数据获取和缓存管理 2026-01-11 19:41:13 +08:00
catlog22
b77672dda4 feat: 增强模型下载功能,支持 HuggingFace Hub 直接下载 ONNX 格式模型 2026-01-11 18:22:36 +08:00
catlog22
1e91fa9f9e feat: Add custom model download functionality and enhance model management
- Implemented `model-download-custom` command to download HuggingFace models.
- Added support for discovering manually placed models in the cache.
- Enhanced the model list view to display recommended and discovered models separately.
- Introduced JSON editor for direct configuration mode in API settings.
- Added validation and formatting features for JSON input.
- Updated translations for new API settings and common actions.
- Improved user interface for model management, including action buttons and tooltips.
2026-01-11 15:13:11 +08:00
catlog22
16083130f8 feat: Refactor CLI tool configuration management and introduce skill context loader
- Updated `claude-cli-tools.ts` to support new model configurations and migration from older versions.
- Added `getPredefinedModels` and `getAllPredefinedModels` functions for better model management.
- Deprecated `cli-config-manager.ts` in favor of `claude-cli-tools.ts`, maintaining backward compatibility.
- Introduced `skill-context-loader.ts` to handle skill context loading based on user prompts and keywords.
- Enhanced tool configuration functions to include secondary models and improved migration logic.
- Updated index file to register the new skill context loader tool.
2026-01-11 13:56:20 +08:00
catlog22
2c11392848 feat: auto-update developmentIndex on session archive (closes #58)
- Add updateDevelopmentIndex() function to session-manager.ts
- Auto-append entry to developmentIndex when archiving sessions
- Add timeline view toggle for Development History section
- Support both 'archivedAt' and 'date' field names for compatibility
- Add dynamic calculation for statistics (Total Features, Last Updated)
- Add CSS styles for timeline view
2026-01-11 11:05:41 +08:00
catlog22
30ff742310 feat: 添加高可用性模型池支持,优化路径解析功能 2026-01-08 23:54:32 +08:00
catlog22
84168825d6 feat: 添加工具调用支持,增强 CLI 工具和 MCP 管理功能 2026-01-08 23:32:27 +08:00
catlog22
311ce2e4bc feat: 添加推荐 MCP 服务器功能和安装向导 2026-01-08 22:37:50 +08:00
catlog22
ea5c0bc9a4 feat: Enhance CLI tools and settings management
- Added auto-initialization of CSRF token for state-changing requests in cli-manager.js.
- Refactored Claude CLI Tools configuration to separate tools and settings into cli-tools.json and cli-settings.json respectively.
- Introduced new interfaces for Claude CLI Tools and Settings, including support for tags and primary models.
- Implemented loading and saving functions for CLI settings, ensuring backward compatibility with legacy combined config.
- Updated functions to synchronize tags between CLI tools and configuration manager.
- Added error handling and logging for loading and saving configurations.
- Created initial cli-settings.json with default settings.
2026-01-08 22:00:07 +08:00
catlog22
0bd2cff5b7 feat: 添加 OpenCode AI 助手支持,增强 CLI 工具功能 2026-01-08 20:39:41 +08:00
catlog22
faf32b5086 fix: 改为在文件末尾添加独立章节
- 启用时添加 "## 中文回复" 章节到文件末尾
- 禁用时移除整个章节
- 不再依赖标题匹配
2026-01-08 20:27:09 +08:00
catlog22
8f7ab3e268 fix: 修复 Codex AGENTS.md 标题匹配模式
- 支持 "Codex Code Guidelines" 和 "Codex Instructions" 两种标题
- 使用不区分大小写的正则匹配
2026-01-08 20:25:04 +08:00
catlog22
a433861f77 feat: 中文回复设置支持 Claude 和 Codex 双 CLI
- 后端 API 支持 target 参数区分 claude/codex
- 前端界面分别显示 CLAUDE.md 和 AGENTS.md 状态
- 添加中英文翻译支持
2026-01-08 20:16:22 +08:00
catlog22
886a8ef8b0 refactor: 精简中文回复准则,支持中文 commit
- 移除冗余格式说明,保留核心规则
- Git commit 规则改为使用中文提交信息
- 文件从 39 行精简至 25 行
2026-01-08 20:06:54 +08:00
catlog22
3124125b4c feat: 添加标签颜色变体和验证功能,增强工具配置管理 2026-01-08 19:11:27 +08:00
catlog22
d0523684e5 feat: Enhance CLI output handling with structured Intermediate Representation (IR)
- Introduced `CliOutputUnit` and `IOutputParser` interfaces for unified output processing.
- Implemented `PlainTextParser` and `JsonLinesParser` for parsing raw CLI output into structured units.
- Updated `executeCliTool` to utilize output parsers and handle structured output.
- Added `flattenOutputUnits` utility for extracting clean output from structured data.
- Enhanced `ConversationTurn` and `ExecutionRecord` interfaces to include structured output.
- Created comprehensive documentation for CLI Output Converter usage and integration.
- Improved error handling and type mapping for various output formats.
2026-01-08 17:26:40 +08:00
catlog22
b86cdd6644 feat(cli-settings): Implement CLI settings management and routes
- Added CLI settings file manager to handle endpoint configurations.
- Introduced API routes for creating, updating, deleting, and listing CLI settings.
- Enhanced session discovery for OpenCode with improved storage structure.
- Updated command building logic for OpenCode and Claude to support new settings.
- Added validation and sanitization for endpoint IDs and settings.
- Implemented functionality to toggle endpoint enabled status and retrieve executable settings paths.
2026-01-08 14:15:32 +08:00
catlog22
55fa170b4e feat: 添加对 OpenCode 的支持,更新 CLI 工具配置和会话发现逻辑 2026-01-08 10:47:07 +08:00
catlog22
d2d6cce5f4 feat: 添加忽略模式配置接口和前端支持,允许用户自定义索引排除项 2026-01-07 23:33:40 +08:00
catlog22
178d45e232 Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2026-01-07 22:36:49 +08:00
catlog22
09d99abee6 Issue Queue: issue-exec-20260106-160325 (#52)
* feat(security): Secure dashboard server by default

## Solution Summary
- Solution-ID: SOL-DSC-002-1
- Issue-ID: DSC-002

## Tasks Completed
- [T1] JWT token manager (24h expiry, persisted secret/token)
- [T2] API auth middleware + localhost token endpoint
- [T3] Default bind 127.0.0.1, add --host with warning
- [T4] Localhost-only CORS with credentials + Vary
- [T5] SECURITY.md documentation + README link

## Verification
- npm run build
- npm test -- ccw/tests/token-manager.test.ts ccw/tests/middleware.test.ts ccw/tests/server-auth.integration.test.ts ccw/tests/server.test.ts ccw/tests/cors.test.ts

* fix(security): Prevent command injection in Windows spawn()

## Solution Summary
- **Solution-ID**: SOL-DSC-001-1
- **Issue-ID**: DSC-001
- **Risk/Impact/Complexity**: high/high/medium

## Tasks Completed
- [T1] Create Windows shell escape utility
- [T2] Escape cli-executor spawn() args on Windows
- [T3] Add command injection regression tests

## Files Modified
- ccw/src/utils/shell-escape.ts
- ccw/src/tools/cli-executor.ts
- ccw/tests/shell-escape.test.ts
- ccw/tests/security/command-injection.test.ts

## Verification
- npm run build
- npm test -- ccw/tests/shell-escape.test.ts ccw/tests/security/command-injection.test.ts

* fix(security): Harden path validation (DSC-005)

## Solution Summary
- Solution-ID: SOL-DSC-005-1
- Issue-ID: DSC-005

## Tasks Completed
- T1: Refactor path validation to pre-resolution checking
- T2: Implement allowlist-based path validation
- T3: Add path validation to API routes
- T4: Add path security regression tests

## Files Modified
- ccw/src/utils/path-resolver.ts
- ccw/src/utils/path-validator.ts
- ccw/src/core/routes/graph-routes.ts
- ccw/src/core/routes/files-routes.ts
- ccw/src/core/routes/skills-routes.ts
- ccw/tests/path-resolver.test.ts
- ccw/tests/graph-routes.test.ts
- ccw/tests/files-routes.test.ts
- ccw/tests/skills-routes.test.ts
- ccw/tests/security/path-traversal.test.ts

## Verification
- npm run build
- npm test -- path-resolver.test.ts
- npm test -- path-validator.test.ts
- npm test -- graph-routes.test.ts
- npm test -- files-routes.test.ts
- npm test -- skills-routes.test.ts
- npm test -- ccw/tests/security/path-traversal.test.ts

* fix(security): Prevent credential leakage (DSC-004)

## Solution Summary
- Solution-ID: SOL-DSC-004-1
- Issue-ID: DSC-004

## Tasks Completed
- T1: Create credential handling security tests
- T2: Add log sanitization tests
- T3: Add env var leakage prevention tests
- T4: Add secure storage tests

## Files Modified
- ccw/src/config/litellm-api-config-manager.ts
- ccw/src/core/routes/litellm-api-routes.ts
- ccw/tests/security/credential-handling.test.ts

## Verification
- npm run build
- node --experimental-strip-types --test ccw/tests/security/credential-handling.test.ts

* test(ranking): expand normalize_weights edge case coverage (ISS-1766920108814-0)

## Solution Summary
- Solution-ID: SOL-20251228113607
- Issue-ID: ISS-1766920108814-0

## Tasks Completed
- T1: Fix NaN and invalid total handling in normalize_weights
- T2: Add unit tests for NaN edge cases in normalize_weights

## Files Modified
- codex-lens/tests/test_rrf_fusion.py

## Verification
- python -m pytest codex-lens/tests/test_rrf_fusion.py::TestNormalizeBM25Score -v
- python -m pytest codex-lens/tests/test_rrf_fusion.py -v -k normalize
- python -m pytest codex-lens/tests/test_rrf_fusion.py::TestReciprocalRankFusion::test_weight_normalization codex-lens/tests/test_cli_hybrid_search.py::TestCLIHybridSearch::test_weights_normalization -v

* feat(security): Add CSRF protection and tighten CORS (DSC-006)

## Solution Summary
- Solution-ID: SOL-DSC-006-1
- Issue-ID: DSC-006
- Risk/Impact/Complexity: high/high/medium

## Tasks Completed
- T1: Create CSRF token generation system
- T2: Add CSRF token endpoints
- T3: Implement CSRF validation middleware
- T4: Restrict CORS to trusted origins
- T5: Add CSRF security tests

## Files Modified
- ccw/src/core/auth/csrf-manager.ts
- ccw/src/core/auth/csrf-middleware.ts
- ccw/src/core/routes/auth-routes.ts
- ccw/src/core/server.ts
- ccw/tests/csrf-manager.test.ts
- ccw/tests/auth-routes.test.ts
- ccw/tests/csrf-middleware.test.ts
- ccw/tests/security/csrf.test.ts

## Verification
- npm run build
- node --experimental-strip-types --test ccw/tests/csrf-manager.test.ts
- node --experimental-strip-types --test ccw/tests/auth-routes.test.ts
- node --experimental-strip-types --test ccw/tests/csrf-middleware.test.ts
- node --experimental-strip-types --test ccw/tests/cors.test.ts
- node --experimental-strip-types --test ccw/tests/security/csrf.test.ts

* fix(cli-executor): prevent stale SIGKILL timeouts

## Solution Summary

- Solution-ID: SOL-DSC-007-1

- Issue-ID: DSC-007

- Risk/Impact/Complexity: low/low/low

## Tasks Completed

- [T1] Store timeout handle in killCurrentCliProcess

## Files Modified

- ccw/src/tools/cli-executor.ts

- ccw/tests/cli-executor-kill.test.ts

## Verification

- node --experimental-strip-types --test ccw/tests/cli-executor-kill.test.ts

* fix(cli-executor): enhance merge validation guards

## Solution Summary

- Solution-ID: SOL-DSC-008-1

- Issue-ID: DSC-008

- Risk/Impact/Complexity: low/low/low

## Tasks Completed

- [T1] Enhance sourceConversations array validation

## Files Modified

- ccw/src/tools/cli-executor.ts

- ccw/tests/cli-executor-merge-validation.test.ts

## Verification

- node --experimental-strip-types --test ccw/tests/cli-executor-merge-validation.test.ts

* refactor(core): remove @ts-nocheck from core routes

## Solution Summary
- Solution-ID: SOL-DSC-003-1
- Issue-ID: DSC-003
- Queue-ID: QUE-20260106-164500
- Item-ID: S-9

## Tasks Completed
- T1: Create shared RouteContext type definition
- T2: Remove @ts-nocheck from small route files
- T3: Remove @ts-nocheck from medium route files
- T4: Remove @ts-nocheck from large route files
- T5: Remove @ts-nocheck from remaining core files

## Files Modified
- ccw/src/core/dashboard-generator-patch.ts
- ccw/src/core/dashboard-generator.ts
- ccw/src/core/routes/ccw-routes.ts
- ccw/src/core/routes/claude-routes.ts
- ccw/src/core/routes/cli-routes.ts
- ccw/src/core/routes/codexlens-routes.ts
- ccw/src/core/routes/discovery-routes.ts
- ccw/src/core/routes/files-routes.ts
- ccw/src/core/routes/graph-routes.ts
- ccw/src/core/routes/help-routes.ts
- ccw/src/core/routes/hooks-routes.ts
- ccw/src/core/routes/issue-routes.ts
- ccw/src/core/routes/litellm-api-routes.ts
- ccw/src/core/routes/litellm-routes.ts
- ccw/src/core/routes/mcp-routes.ts
- ccw/src/core/routes/mcp-routes.ts.backup
- ccw/src/core/routes/mcp-templates-db.ts
- ccw/src/core/routes/nav-status-routes.ts
- ccw/src/core/routes/rules-routes.ts
- ccw/src/core/routes/session-routes.ts
- ccw/src/core/routes/skills-routes.ts
- ccw/src/core/routes/status-routes.ts
- ccw/src/core/routes/system-routes.ts
- ccw/src/core/routes/types.ts
- ccw/src/core/server.ts
- ccw/src/core/websocket.ts

## Verification
- npm run build
- npm test

* refactor: split cli-executor and codexlens routes into modules

## Solution Summary
- Solution-ID: SOL-DSC-012-1
- Issue-ID: DSC-012
- Risk/Impact/Complexity: medium/medium/high

## Tasks Completed
- [T1] Extract execution orchestration from cli-executor.ts (Refactor ccw/src/tools)
- [T2] Extract route handlers from codexlens-routes.ts (Refactor ccw/src/core/routes)
- [T3] Extract prompt concatenation logic from cli-executor (Refactor ccw/src/tools)
- [T4] Document refactored module architecture (Docs)

## Files Modified
- ccw/src/tools/cli-executor.ts
- ccw/src/tools/cli-executor-core.ts
- ccw/src/tools/cli-executor-utils.ts
- ccw/src/tools/cli-executor-state.ts
- ccw/src/tools/cli-prompt-builder.ts
- ccw/src/tools/README.md
- ccw/src/core/routes/codexlens-routes.ts
- ccw/src/core/routes/codexlens/config-handlers.ts
- ccw/src/core/routes/codexlens/index-handlers.ts
- ccw/src/core/routes/codexlens/semantic-handlers.ts
- ccw/src/core/routes/codexlens/watcher-handlers.ts
- ccw/src/core/routes/codexlens/utils.ts
- ccw/src/core/routes/codexlens/README.md

## Verification
- npm run build
- npm test

* test(issue): Add comprehensive issue command tests

## Solution Summary
- **Solution-ID**: SOL-DSC-009-1
- **Issue-ID**: DSC-009
- **Risk/Impact/Complexity**: low/high/medium

## Tasks Completed
- [T1] Create issue command test file structure: Create isolated test harness
- [T2] Add JSONL read/write operation tests: Verify JSONL correctness and errors
- [T3] Add issue lifecycle tests: Verify status transitions and timestamps
- [T4] Add solution binding tests: Verify binding flows and error cases
- [T5] Add queue formation tests: Verify queue creation, IDs, and DAG behavior
- [T6] Add queue execution tests: Verify next/done/retry and status sync

## Files Modified
- ccw/src/commands/issue.ts
- ccw/tests/issue-command.test.ts

## Verification
- node --experimental-strip-types --test ccw/tests/issue-command.test.ts

* test(routes): Add integration tests for route modules

## Solution Summary
- Solution-ID: SOL-DSC-010-1
- Issue-ID: DSC-010
- Queue-ID: QUE-20260106-164500

## Tasks Completed
- [T1] Add tests for ccw-routes.ts
- [T2] Add tests for files-routes.ts
- [T3] Add tests for claude-routes.ts (includes Windows path fix for create)
- [T4] Add tests for issue-routes.ts
- [T5] Add tests for help-routes.ts (avoid hanging watchers)
- [T6] Add tests for nav-status-routes.ts
- [T7] Add tests for hooks/graph/rules/skills/litellm-api routes

## Files Modified
- ccw/src/core/routes/claude-routes.ts
- ccw/src/core/routes/help-routes.ts
- ccw/tests/integration/ccw-routes.test.ts
- ccw/tests/integration/claude-routes.test.ts
- ccw/tests/integration/files-routes.test.ts
- ccw/tests/integration/issue-routes.test.ts
- ccw/tests/integration/help-routes.test.ts
- ccw/tests/integration/nav-status-routes.test.ts
- ccw/tests/integration/hooks-routes.test.ts
- ccw/tests/integration/graph-routes.test.ts
- ccw/tests/integration/rules-routes.test.ts
- ccw/tests/integration/skills-routes.test.ts
- ccw/tests/integration/litellm-api-routes.test.ts

## Verification
- node --experimental-strip-types --test ccw/tests/integration/ccw-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/files-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/claude-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/issue-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/help-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/nav-status-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/hooks-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/graph-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/rules-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/skills-routes.test.ts
- node --experimental-strip-types --test ccw/tests/integration/litellm-api-routes.test.ts

* refactor(core): Switch cache and lite scanning to async fs

## Solution Summary
- Solution-ID: SOL-DSC-013-1
- Issue-ID: DSC-013
- Queue-ID: QUE-20260106-164500

## Tasks Completed
- [T1] Convert cache-manager.ts to async file operations
- [T2] Convert lite-scanner.ts to async file operations
- [T3] Update cache-manager call sites to await async API
- [T4] Update lite-scanner call sites to await async API

## Files Modified
- ccw/src/core/cache-manager.ts
- ccw/src/core/lite-scanner.ts
- ccw/src/core/data-aggregator.ts

## Verification
- npm run build
- npm test

* fix(exec): Add timeout protection for execSync

## Solution Summary
- Solution-ID: SOL-DSC-014-1
- Issue-ID: DSC-014
- Queue-ID: QUE-20260106-164500

## Tasks Completed
- [T1] Add timeout to execSync calls in python-utils.ts
- [T2] Add timeout to execSync calls in detect-changed-modules.ts
- [T3] Add timeout to execSync calls in claude-freshness.ts
- [T4] Add timeout to execSync calls in issue.ts
- [T5] Consolidate execSync timeout constants and audit coverage

## Files Modified
- ccw/src/utils/exec-constants.ts
- ccw/src/utils/python-utils.ts
- ccw/src/tools/detect-changed-modules.ts
- ccw/src/core/claude-freshness.ts
- ccw/src/commands/issue.ts
- ccw/src/tools/smart-search.ts
- ccw/src/tools/codex-lens.ts
- ccw/src/core/routes/codexlens/config-handlers.ts

## Verification
- npm run build
- npm test
- node --experimental-strip-types --test ccw/tests/issue-command.test.ts

* feat(cli): Add progress spinner with elapsed time for long-running operations

## Solution Summary
- Solution-ID: SOL-DSC-015-1
- Issue-ID: DSC-015
- Queue-Item: S-15
- Risk/Impact/Complexity: low/medium/low

## Tasks Completed
- [T1] Add progress spinner to CLI execution: Update ccw/src/commands/cli.ts

## Files Modified
- ccw/src/commands/cli.ts
- ccw/tests/cli-command.test.ts

## Verification
- node --experimental-strip-types --test ccw/tests/cli-command.test.ts
- node --experimental-strip-types --test ccw/tests/cli-executor-kill.test.ts
- node --experimental-strip-types --test ccw/tests/cli-executor-merge-validation.test.ts

* fix(cli): Move full output hint immediately after truncation notice

## Solution Summary
- Solution-ID: SOL-DSC-016-1
- Issue-ID: DSC-016
- Queue-Item: S-16
- Risk/Impact/Complexity: low/high/low

## Tasks Completed
- [T1] Relocate output hint after truncation: Update ccw/src/commands/cli.ts

## Files Modified
- ccw/src/commands/cli.ts
- ccw/tests/cli-command.test.ts

## Verification
- npm run build
- node --experimental-strip-types --test ccw/tests/cli-command.test.ts

* feat(cli): Add confirmation prompts for destructive operations

## Solution Summary
- Solution-ID: SOL-DSC-017-1
- Issue-ID: DSC-017
- Queue-Item: S-17
- Risk/Impact/Complexity: low/high/low

## Tasks Completed
- [T1] Add confirmation to storage clean operations: Update ccw/src/commands/cli.ts
- [T2] Add confirmation to issue queue delete: Update ccw/src/commands/issue.ts

## Files Modified
- ccw/src/commands/cli.ts
- ccw/src/commands/issue.ts
- ccw/tests/cli-command.test.ts
- ccw/tests/issue-command.test.ts

## Verification
- npm run build
- node --experimental-strip-types --test ccw/tests/cli-command.test.ts
- node --experimental-strip-types --test ccw/tests/issue-command.test.ts

* feat(cli): Improve multi-line prompt guidance

## Solution Summary
- Solution-ID: SOL-DSC-018-1
- Issue-ID: DSC-018
- Queue-Item: S-18
- Risk/Impact/Complexity: low/medium/low

## Tasks Completed
- [T1] Update CLI help to emphasize --file option: Update ccw/src/commands/cli.ts
- [T2] Add inline hint for multi-line detection: Update ccw/src/commands/cli.ts

## Files Modified
- ccw/src/commands/cli.ts
- ccw/tests/cli-command.test.ts

## Verification
- npm run build
- node --experimental-strip-types --test ccw/tests/cli-command.test.ts

---------

Co-authored-by: catlog22 <catlog22@github.com>
2026-01-07 22:35:46 +08:00
catlog22
6e93c36b89 feat: 优化工作区索引状态刷新,增强头部徽章更新逻辑 2026-01-07 22:28:36 +08:00
catlog22
fae2f7e279 feat: 始终注册队列变更回调以支持标准输出(TypeScript 后端) 2026-01-07 22:21:11 +08:00
catlog22
2e68a18afd fix: 修复 stopWatcherProcess 函数的错误处理,确保返回值一致性 2026-01-07 22:10:20 +08:00
catlog22
05514631f2 feat: Enhance JSON streaming parsing and UI updates
- Added a function to parse JSON streaming content in core-memory.js, extracting readable text from messages.
- Updated memory detail view to utilize the new parsing function for content and summary.
- Introduced an enableReview option in rules-manager.js, allowing users to toggle review functionality in rule creation.
- Simplified skill creation modal in skills-manager.js by removing generation type selection UI.
- Improved CLI executor to handle tool calls for file writing, ensuring proper output parsing.
- Adjusted CLI command tests to set timeout to 0 for immediate execution.
- Updated file watcher to implement a true debounce mechanism and added a pending queue status for UI updates.
- Enhanced watcher manager to handle queue changes and provide JSON output for better integration with TypeScript backend.
- Established TypeScript naming conventions documentation to standardize code style across the project.
2026-01-07 21:51:26 +08:00
catlog22
e9fb7be85f feat: 增强工作树管理功能,支持恢复现有工作树并优化执行命令的参数提示 2026-01-07 16:58:30 +08:00
catlog22
42fbc1936d feat: 更新执行命令的参数提示,支持指定现有工作树路径,增强工作树管理功能 2026-01-07 16:54:23 +08:00
catlog22
87d38a3374 feat: 添加重排序模型配置,支持最大输入令牌数,优化 API 批处理能力 2026-01-07 15:50:22 +08:00
catlog22
6aa79c6dc9 feat: 添加工作空间索引状态接口,增强 CodexLens 状态检查功能,支持前端显示索引信息 2026-01-07 11:36:06 +08:00
catlog22
1bd3d9c9bf feat: 移除文档语言配置,优化代码语言分类 2026-01-07 10:10:25 +08:00
catlog22
86d3e36722 feat: 增强解决方案管理功能,支持按解决方案 ID 过滤和简要输出,优化嵌入模型配置读取 2026-01-07 09:31:52 +08:00
catlog22
05f762117a feat: 添加 CodexLens 配置接口,增强索引状态检查功能,支持并行获取状态和配置 2026-01-06 23:34:10 +08:00
catlog22
1298fdd20f feat: 增加搜索功能的代码过滤选项,支持排除特定文件扩展名和仅返回代码文件 2026-01-06 23:19:47 +08:00
catlog22
ef770ff29b Add comprehensive code review specifications and templates
- Introduced best practices requirements specification covering code quality, performance, maintainability, error handling, and documentation standards.
- Established quality standards with overall quality metrics and mandatory checks for security, code quality, performance, and maintainability.
- Created security requirements specification aligned with OWASP Top 10 and CWE Top 25, detailing checks and patterns for common vulnerabilities.
- Developed templates for documenting best practice findings, security findings, and generating reports, including structured markdown and JSON formats.
- Updated dependencies in the project, ensuring compatibility and stability.
- Added test files and README documentation for vector indexing tests.
2026-01-06 23:11:15 +08:00
catlog22
02d66325a0 feat: 添加调试探索代理文档,包含五阶段调试工作流程和NDJSON日志格式 2026-01-06 17:02:40 +08:00
catlog22
a5024bdcbb feat: 更新命令文档,增强 Bash 兼容性并添加动态模型选项更新功能 2026-01-06 15:39:22 +08:00
catlog22
6cb819cb3a Enhance FastEmbed Integration and GPU Management
- Updated Windows platform guidelines for path formats and Bash rules.
- Refactored CodexLens routes to improve GPU detection and indexing cancellation logic.
- Added FastEmbed installation status handling in the dashboard, including UI updates for installation and reinstallation options.
- Implemented local model management with improved API responses for downloaded models.
- Enhanced GPU selection logic in the model mode configuration.
- Improved error handling and user feedback for FastEmbed installation processes.
- Adjusted Python environment checks to avoid shell escaping issues on Windows.
2026-01-06 14:42:00 +08:00
catlog22
08099cdcb9 feat: 增加 Python 冷启动超时至 15 秒,并优化获取状态和配置的命令 2026-01-06 08:56:55 +08:00
catlog22
1451594ae6 feat: Add user action prompt after issue discovery and enhance environment variable support for embedding and reranker configurations 2026-01-05 23:58:23 +08:00
catlog22
2e90230097 feat: Update import path for TextCrossEncoder to support fastembed versioning and add fallback for older versions 2026-01-05 23:13:52 +08:00
catlog22
f90c6b9fab feat: Enhance CodexLens uninstallation process with improved error handling and process termination for locked files 2026-01-05 22:40:26 +08:00
catlog22
853977c676 feat: Add reranker model management commands and UI integration
- Implemented CLI commands for listing, downloading, deleting, and retrieving information about reranker models.
- Enhanced the dashboard UI to support embedding and reranker configurations with internationalization.
- Updated environment variable management for embedding and reranker settings.
- Added functionality to dynamically update model options based on selected backend.
- Improved user experience with status indicators and action buttons for model management.
- Integrated new reranker models with detailed metadata and recommendations.
2026-01-05 21:23:09 +08:00
catlog22
2087f2d350 feat: add new translations for index management, incremental update, and environment variables in i18n module; enhance UI for API model info display and streamline index management section 2026-01-05 20:19:19 +08:00
catlog22
f4585c8dea feat: enhance reranker and embedding configuration management with settings.json support 2026-01-05 17:21:34 +08:00
catlog22
a2c599d6fa Refactor workflow commands to use "execute" terminology instead of "dispatch" for clarity and consistency across TDD, test generation, and UI design processes. Update task attachment model descriptions and ensure all phases reflect the new execution model. Additionally, hide certain UI elements in the dashboard template to disable unused features. 2026-01-05 11:40:53 +08:00
catlog22
256a07e584 feat: update server port handling and improve session lifecycle test assertions 2026-01-05 10:48:08 +08:00
catlog22
b361f42c1c Add E2E tests for MCP Tool Execution and Session Lifecycle
- Implement comprehensive end-to-end tests for MCP Tool Execution, covering tool discovery, execution, parameter validation, error handling, and timeout scenarios.
- Introduce tests for the complete lifecycle of a workflow session, including initialization, task management, status updates, and archiving.
- Validate dual parameter format support and handle boundary conditions such as invalid JSON, non-existent sessions, and path traversal attempts.
- Ensure concurrent task updates are handled without data loss and that task data is preserved when archiving sessions.
- List sessions across all locations and verify metadata inclusion in the results.
2026-01-05 09:44:08 +08:00
catlog22
33f2aef4e6 feat: enhance CLI stream viewer with active execution synchronization and improved tab UI 2026-01-04 23:17:58 +08:00
catlog22
4fb6b2d1de feat: add danger protection hooks and internationalization support for confirmation dialogs 2026-01-04 22:43:15 +08:00
catlog22
373f1d57c1 feat: update CLI timeout handling and add active execution state management 2026-01-04 22:14:43 +08:00
catlog22
81f4d084b0 feat: add navigation status routes and update badge aggregation logic 2026-01-04 21:04:28 +08:00
catlog22
2a13d8b17f feat: update CLI commands to new structure and enhance settings handling 2026-01-04 19:56:40 +08:00
catlog22
27a0129f72 feat: update execution commands to commit once per solution and enhance reranker model handling 2026-01-04 15:09:47 +08:00
catlog22
7e3d9007cd Remove remote installation script (install-remote.sh) due to deprecation and transition to new installation methods. 2026-01-04 12:04:13 +08:00
catlog22
df4d6fdc45 feat: enhance watcher control modal to fetch indexed projects and set default path 2026-01-04 11:20:49 +08:00
catlog22
f28b6c6197 feat: implement CodexLens watcher status handling and UI updates 2026-01-03 23:47:02 +08:00
catlog22
1825ed3bcf feat: update CodexLens route to spawn watcher using Python and add getVenvPythonPath export 2026-01-03 22:41:34 +08:00
catlog22
504ccfebbc feat: add reranker models to ProviderCredential and improve FastEmbedReranker scoring
- Added `rerankerModels` property to the `ProviderCredential` interface in `litellm-api-config.ts` to support additional reranker configurations.
- Introduced a numerically stable sigmoid function in `FastEmbedReranker` for score normalization.
- Updated the scoring logic in `FastEmbedReranker` to use raw float scores from the encoder and normalize them using the new sigmoid function.
- Adjusted the result mapping to maintain original document order while applying normalization.
2026-01-03 22:20:06 +08:00
catlog22
74ad2d0463 feat(issue-queue): add multi-queue parallel execution support
Add --queues parameter to enable parallel queue formation with multiple
issue-queue-agents. Solutions are partitioned by file overlap to minimize
cross-queue conflicts. Queue groups are linked via queue_group field.
2026-01-03 20:55:48 +08:00
catlog22
0af84be775 feat(model-lock): implement model lock management with localStorage support 2026-01-03 19:48:07 +08:00
catlog22
6043e6aa3b docs: improve task division strategy and add post-review prompt
- Add task division strategy to action-planning-agent: minimize count,
  share context, avoid overload
- Add post-review action to workflow review: prompt user to complete session
2026-01-03 19:42:40 +08:00
catlog22
e3dba87e08 feat(skills): add CCW orchestrator and refactor command-guide to ccw-help
CCW Skill (new):
- Stateless workflow orchestrator with intent classification
- 6 workflow combinations: rapid, full, coupled, bugfix, issue, ui
- External configuration: intent-rules.json, workflow-chains.json
- Implicit CLI tool injection (Gemini/Qwen/Codex)
- TODO tracking integration for workflow progress

CCW-Help Skill (refactored from command-guide):
- Renamed command-guide → ccw-help
- Removed reference folder duplication
- Source paths now relative from index/ (../../../commands/...)
- Added all-agents.json index
- Simplified SKILL.md following CCW pattern
2026-01-03 18:46:59 +08:00
catlog22
ad6c18f615 fix(security): prevent command injection and strengthen input validation
BREAKING: executeCodexLens now uses shell:false to prevent RCE

Security fixes:
- Remove shell:true from spawn() to prevent command injection (CRITICAL)
- Add .env value escaping to prevent injection when file is sourced
- Strengthen path validation with startsWith to block subdirectories
- Add path traversal detection (../)
- Improve JSON extraction to handle trailing CLI output

Features:
- Refactor CodexLens panel to tabbed layout (Overview/Settings/Search/Advanced)
- Add environment variables editor for ~/.codexlens/.env
- Add API concurrency settings (max_workers, batch_size)
- Add escapeHtml() helper to prevent XSS
- Implement merge mode for env saving to preserve custom variables
2026-01-03 18:33:47 +08:00
catlog22
be498acf59 feat: Add code analysis and LLM action templates with detailed configurations and examples
- Introduced a comprehensive code analysis action template for integrating code exploration and analysis capabilities.
- Added LLM action template for seamless integration of LLM calls with customizable prompts and tools.
- Implemented a benchmark search script to compare multiple search methods across various dimensions including speed, result quality, ranking stability, and coverage.
- Provided preset configurations for common analysis tasks and LLM actions, enhancing usability and flexibility.
2026-01-03 17:37:49 +08:00
catlog22
6a45035e3f fix: align test-fix-agent with code-developer task parsing
- Add Command-to-Tool Mapping for pre_analysis commands
- Add Execution Mode Selection for implementation_approach steps
  - command field exists → Execute CLI via Bash
  - no command → Agent direct execution with test_commands
2026-01-03 17:34:55 +08:00
catlog22
28bd781062 fix: improve workflow execute command and agent task parsing
- Fix bash command syntax in execute.md for Windows compatibility
  - Convert multi-line for loop to single-line format
  - Use single quotes for grep patterns to avoid escaping issues

- Simplify agent prompt template in execute.md
  - Path-based invocation instead of embedding task content
  - Add [FLOW_CONTROL] and "Implement" markers to trigger agent behavior

- Enhance code-developer.md Task JSON parsing
  - Add explicit Task JSON field mapping (requirements, acceptance, etc.)
  - Add STEP 1/2/3 execution flow for clarity
  - Add Pre-Analysis Execution format with command-to-tool mapping
  - Define default behavior when command field is missing
  - Priority: Use tech_stack from JSON before auto-detection

- Add execution_config alignment rules to action-planning-agent.md
  - Ensure meta.execution_config matches implementation_approach
  - "agent" mode: no command fields, cli_tool: null
  - "hybrid" mode: some command fields
  - "cli" mode: all steps have command fields
2026-01-03 17:26:23 +08:00
catlog22
9922d455da feat: Add templates for autonomous actions, orchestrators, sequential phases, and skill documentation
- Introduced a comprehensive template for autonomous actions, detailing structure, execution, and error handling.
- Added an orchestrator template to manage state and decision logic for autonomous actions.
- Created a sequential phase template to outline execution steps and objectives for structured workflows.
- Developed a skill documentation template to standardize the generation of skill entry files.
- Implemented a Python script to compare search results between hybrid and cascade methods, analyzing ranking changes.
2026-01-03 15:58:31 +08:00
catlog22
ac23fe5b5a docs: sync version numbers to v6.3.18 across all documentation
- Update README.md/README_CN.md badges and version text to v6.3.18
- Update INSTALL.md version menu examples from v4.6.0 to v6.3.18
- Fix INSTALL_CN.md repository URL (Claude-CCW → Claude-Code-Workflow)
- Fix INSTALL_CN.md directory name (Dmsflow → Claude-Code-Workflow)
2026-01-03 15:22:57 +08:00
catlog22
bab5625123 feat: 添加全局环境变量加载功能并更新配置说明 2026-01-03 15:14:45 +08:00
catlog22
f674b90a62 chore: add .ccw/worktrees/ to gitignore 2026-01-03 12:49:13 +08:00
catlog22
6a545fdeb7 fix(issue): Enhance worktree detection with fallback support
- Add normalizePath() for Windows case-insensitive comparison
- Add resolveMainRepoFromGitFile() to parse .git file when git command fails
- Enhanced fallback logic reads .git file content (gitdir: path) to find main repo
- Supports worktree detection even without git CLI available
2026-01-03 12:32:26 +08:00
catlog22
b01f021f1c docs(issue): Simplify worktree instructions with auto-detection
ccw issue commands now auto-detect worktree and redirect to main repo,
so shell_command no longer needs workdir parameter.
2026-01-03 12:27:59 +08:00
catlog22
f934ea6664 feat(issue): Auto-detect worktree and redirect to main repo
getProjectRoot() now detects if running from a git worktree and
automatically resolves to the main repository path. This allows
all ccw issue commands to work correctly from within a worktree.

Uses git rev-parse --git-common-dir to find main repo's .git
2026-01-03 12:26:34 +08:00
catlog22
52639c9bdd fix(issue): Use correct Codex tool interfaces
- update_plan: { explanation, plan: [{step, status}] }
- shell_command: { command, workdir } for ccw commands in main repo
- multi_tool_use.parallel for reading context files in parallel
2026-01-03 12:19:39 +08:00
catlog22
152fb6b6ad fix(issue): Fix worktree execution and Codex tool compatibility
- ccw issue commands must run from main repo (not worktree)
- Add worktree execution pattern: fetch solution -> cd worktree -> implement -> cd main -> done
- Replace TodoWrite with update_plan for Codex compatibility
- Add rule 10: worktree ccw commands from main repo
2026-01-03 12:12:49 +08:00
catlog22
990cf8a05d fix(issue): Improve worktree implementation safety
- Use absolute paths via git rev-parse --show-toplevel
- Add cleanup traps for graceful failure handling (EXIT/INT/TERM)
- Add git worktree prune at startup for stale worktrees
- Validate main repo state before merge (fallback to PR if dirty)
- Change default to "Create PR" for parallel execution safety
- Move worktree directory to .ccw/worktrees/ (gitignored)
2026-01-03 11:56:15 +08:00
catlog22
713894090d feat(codexlens): Improve search defaults and add explicit SPLADE mode
Config changes:
- Disable SPLADE by default (slow ~360ms), use FTS instead
- Enable use_fts_fallback by default for faster sparse search

CLI improvements:
- Fix duplicate index_app typer definition
- Add cascade_search dispatch for cascade method
- Rename 'mode' to 'method' in search output
- Mark embeddings-status, splade-status as deprecated
- Add enable_splade and enable_cascade to search options

Hybrid search:
- Add enable_splade parameter for explicit SPLADE mode
- Add fallback handling when SPLADE is requested but unavailable
2026-01-03 11:49:58 +08:00
catlog22
2391c77910 feat(issue): Add user choice for worktree completion in Claude execute.md
- Replace auto-merge with AskUserQuestion (merge/PR/keep)
- Consistent with .codex/prompts/issue-execute.md behavior
2026-01-03 11:49:14 +08:00
catlog22
ffb0e90ff3 feat(issue): Add user choice for worktree completion (merge/PR/keep)
- Replace auto-delete cleanup with AskUserQuestion
- Options: Merge to main, Create PR, Keep branch
- Prevents accidental loss of worktree commits
2026-01-03 11:48:14 +08:00
catlog22
740bd1b61e fix(codexlens): Fix constructor and path handling issues
1. GlobalSymbolIndex constructor: Add project_id parameter lookup
   - Get project_id from registry using source_root
   - Pass project_id to GlobalSymbolIndex constructor

2. Binary cascade search path handling:
   - Add VectorMetadataStore import for centralized search
   - Fix _build_results_from_candidates to handle centralized mode
   - Use VectorMetadataStore for metadata, source_index_db for embeddings
   - Properly distinguish between index_root and index_path

3. Dense reranking for centralized search:
   - Get chunk metadata from _vectors_meta.db
   - Group chunks by source_index_db
   - Retrieve dense embeddings from respective _index.db files
2026-01-03 11:47:07 +08:00
catlog22
a364a10d6a fix(ccw): Add path validation for --cd parameter in CLI executor
Validate working directory path before passing to spawn() to prevent
ENOENT errors when malformed paths are provided. Uses existing
validatePath utility for path validation and existence checks.

- Import validatePath from path-resolver
- Validate cd parameter with mustExist check before use
- Provide clear error message with invalid path details
2026-01-03 11:46:51 +08:00
catlog22
441bcb9e99 docs(issue): Update prompts with multi-queue and worktree support
- issue-queue.md: Add multi-queue management section (activate, priority)
- issue-execute.md: Add --worktree parameter for parallel isolation
- execute.md: Add worktree option in AskUserQuestion and dispatchExecutor
2026-01-03 11:44:14 +08:00
catlog22
714f0c539b feat(workflow): Add archived session support for /workflow:review
- Add --archived flag to explicitly review archived sessions
- Auto-detect session location (active first, then archives)
- Update all path references to use resolved sessionPath
- Add usage examples for archived session review
2026-01-03 11:38:50 +08:00
catlog22
255d4244ea fix(workflow): Add user choice for session completion and sync task status on archive
- Replace auto-complete with AskUserQuestion in execute.md Phase 5
  - User can choose "Enter Review" or "Complete Session"
- Fix archived tasks showing incomplete on dashboard
  - executeArchive now updates all .task/*.json status to completed
2026-01-03 11:36:20 +08:00
catlog22
4fb247f7c5 feat(issue): Add multi-queue support and enhanced failure handling
- Add --queue parameter for explicit queue targeting (next, dag, detail, done, retry)
- Implement serialized multi-queue execution (complete Q1 before Q2)
- Add queue activate/priority subcommands for multi-queue management
- Add FailureDetail interface for structured failure tracking
- Preserve failure history on retry for debugging
- Show failure reasons and retry count in queue status display
- Auto-detect queue from item ID in done/detail commands
2026-01-03 11:31:49 +08:00
catlog22
54fd94547c feat: Enhance embedding generation and search capabilities
- Added pre-calculation of estimated chunk count for HNSW capacity in `generate_dense_embeddings_centralized` to optimize indexing performance.
- Implemented binary vector generation with memory-mapped storage for efficient cascade search, including metadata saving.
- Introduced SPLADE sparse index generation with improved handling and metadata storage.
- Updated `ChainSearchEngine` to prefer centralized binary searcher for improved performance and added fallback to legacy binary index.
- Deprecated `BinaryANNIndex` in favor of `BinarySearcher` for better memory management and performance.
- Enhanced `SpladeEncoder` with warmup functionality to reduce latency spikes during first-time inference.
- Improved `SpladeIndex` with cache size adjustments for better query performance.
- Added methods for managing binary vectors in `VectorMetadataStore`, including batch insertion and retrieval.
- Created a new `BinarySearcher` class for efficient binary vector search using Hamming distance, supporting both memory-mapped and database loading modes.
2026-01-02 23:57:55 +08:00
catlog22
96b44e1482 feat: Add type validation for RRF weights and implement caching for embedder instances 2026-01-02 19:50:51 +08:00
catlog22
c268b531aa feat: Enhance embedding generation to track current index path and improve metadata retrieval 2026-01-02 19:18:26 +08:00
catlog22
0b6e9db8e4 feat: Add centralized vector storage and metadata management for embeddings 2026-01-02 17:18:23 +08:00
catlog22
9157c5c78b feat: Implement centralized storage for SPLADE and vector embeddings
- Added centralized SPLADE database and vector storage configuration in config.py.
- Updated embedding_manager.py to support centralized SPLADE database path.
- Enhanced generate_embeddings and generate_embeddings_recursive functions for centralized storage.
- Introduced centralized ANN index creation in ann_index.py.
- Modified hybrid_search.py to utilize centralized vector index for searches.
- Implemented methods to discover and manage centralized SPLADE and HNSW files.
2026-01-02 16:53:39 +08:00
catlog22
54fb7afdb2 Enhance semantic search capabilities and configuration
- Added category support for programming and documentation languages in Config.
- Implemented category-based filtering in HybridSearchEngine to improve search relevance based on query intent.
- Introduced functions for filtering results by category and determining file categories based on extensions.
- Updated VectorStore to include a category column in the database schema and modified chunk addition methods to support category tagging.
- Enhanced the WatcherConfig to ignore additional common directories and files.
- Created a benchmark script to compare performance between Binary Cascade, SPLADE, and Vector semantic search methods, including detailed result analysis and overlap comparison.
2026-01-02 15:01:20 +08:00
catlog22
92ed2524b7 feat: Enhance SPLADE indexing command to support multiple index databases and add chunk ID management 2026-01-02 13:25:23 +08:00
catlog22
56c03c847a feat: Add method to retrieve all semantic chunks from the vector store
- Implemented `get_all_chunks` method in `VectorStore` class to fetch all semantic chunks from the database.
- Added a new benchmark script `analyze_methods.py` for analyzing hybrid search methods and storage architecture.
- Included detailed analysis of method contributions, storage conflicts, and FTS + Rerank fusion experiments.
- Updated results JSON structure to reflect new analysis outputs and method performance metrics.
2026-01-02 12:32:43 +08:00
catlog22
9129c981a4 feat: Enhance BinaryANNIndex with vectorized search and performance benchmarking 2026-01-02 11:49:54 +08:00
catlog22
da68ba0b82 feat: Implement cascade indexing command and benchmark script for performance evaluation 2026-01-02 11:24:06 +08:00
catlog22
e21d801523 feat: Add multi-type embedding backends for cascade retrieval
- Implemented BinaryEmbeddingBackend for fast coarse filtering using 256-dimensional binary vectors.
- Developed DenseEmbeddingBackend for high-precision dense vectors (2048 dimensions) for reranking.
- Created CascadeEmbeddingBackend to combine binary and dense embeddings for two-stage retrieval.
- Introduced utility functions for embedding conversion and distance computation.

chore: Migration 010 - Add multi-vector storage support

- Added 'chunks' table to support multi-vector embeddings for cascade retrieval.
- Included new columns: embedding_binary (256-dim) and embedding_dense (2048-dim) for efficient storage.
- Implemented upgrade and downgrade functions to manage schema changes and data migration.
2026-01-02 10:52:43 +08:00
catlog22
195438d26a feat(splade): add cache directory support for ONNX models and improve thread-local database connection handling 2026-01-01 22:40:00 +08:00
catlog22
5bb01755bc Implement SPLADE sparse encoder and associated database migrations
- Added `splade_encoder.py` for ONNX-optimized SPLADE encoding, including methods for encoding text and batch processing.
- Created `SPLADE_IMPLEMENTATION.md` to document the SPLADE encoder's functionality, design patterns, and integration points.
- Introduced migration script `migration_009_add_splade.py` to add SPLADE metadata and posting list tables to the database.
- Developed `splade_index.py` for managing the SPLADE inverted index, supporting efficient sparse vector retrieval.
- Added verification script `verify_watcher.py` to test FileWatcher event filtering and debouncing functionality.
2026-01-01 17:41:22 +08:00
catlog22
520f2d26f2 feat(codex-lens): add unified reranker architecture and file watcher
Unified Reranker Architecture:
- Add BaseReranker ABC with factory pattern
- Implement 4 backends: ONNX (default), API, LiteLLM, Legacy
- Add .env configuration parsing for API credentials
- Migrate from sentence-transformers to optimum+onnxruntime

File Watcher Module:
- Add real-time file system monitoring with watchdog
- Implement IncrementalIndexer for single-file updates
- Add WatcherManager with signal handling and graceful shutdown
- Add 'codexlens watch' CLI command
- Event filtering, debouncing, and deduplication
- Thread-safe design with proper resource cleanup

Tests: 16 watcher tests + 5 reranker test files

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 13:23:52 +08:00
catlog22
8ac27548ad refactor(lite-execute): unify task prompt builder with scope+modification_points
- Consolidate Agent and CLI prompt builders into single buildExecutionPrompt()
- Replace file-based task format with scope + modification_points structure
- Simplify to 4-part task template: Modification Points → How → Reference → Done
- Remove duplicate formatTaskForCLI and buildCLIPrompt functions

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 12:46:17 +08:00
catlog22
adc0dd23e4 feat(docs): add swagger-docs command for RESTful API documentation
Add new /memory:swagger-docs command to generate complete Swagger/OpenAPI
documentation following RESTful standards with:
- Global security configuration (Bearer Token auth)
- Complete endpoint documentation with parameters and responses
- Unified error code specification (AUTH/PARAM/BIZ/SYS)
- Multi-language support (--lang zh|en, default: zh)
- Validation test reports

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 11:41:57 +08:00
catlog22
31a45f1f30 Add graph expansion and cross-encoder reranking features
- Implemented GraphExpander to enhance search results with related symbols using precomputed neighbors.
- Added CrossEncoderReranker for second-stage search ranking, allowing for improved result scoring.
- Created migrations to establish necessary database tables for relationships and graph neighbors.
- Developed tests for graph expansion functionality, ensuring related results are populated correctly.
- Enhanced performance benchmarks for cross-encoder reranking latency and graph expansion overhead.
- Updated schema cleanup tests to reflect changes in versioning and deprecated fields.
- Added new test cases for Treesitter parser to validate relationship extraction with alias resolution.
2025-12-31 16:58:59 +08:00
catlog22
4bde13e83a chore: bump version to 6.3.18
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 22:16:52 +08:00
catlog22
a5ab3f8b26 feat(docs): enhance issue planning and queue documentation with new guidelines and commands 2025-12-30 22:15:16 +08:00
catlog22
d183a647dd chore: bump version to 6.3.17
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 20:02:59 +08:00
catlog22
e5797bff8f feat(docs): add guidelines for Git operations to ensure parallel task safety 2025-12-30 19:56:31 +08:00
catlog22
4d73a3c9a9 feat(cli): add streaming output to Dashboard and child process termination
- Add broadcastStreamEvent() for real-time CLI output to Dashboard
- Send CLI_EXECUTION_STARTED/OUTPUT/COMPLETED events via /api/hook
- Add killCurrentCliProcess() to terminate child CLI on SIGINT/SIGTERM
- Track child process reference for cleanup on interruption
- Make CLI stream viewer panel full-height (calc(100vh - 32px))
- Fix completion status not updating by using consistent executionId

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:56:18 +08:00
catlog22
754cddd4ad fix(python): improve Python detection and pip command reliability
- Add shared python-utils.ts module for consistent Python detection
- Use `python -m pip` instead of direct pip command (fixes "pip not found")
- Support CCW_PYTHON env var for custom Python path
- Use Windows py launcher to find compatible versions (3.9-3.12)
- Warn users when Python version may not be compatible with onnxruntime

Fixes issues where users couldn't install ccw-litellm due to:
- pip not in PATH
- Only pip3 available (not pip)
- Python 3.13+ without onnxruntime support

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 15:23:44 +08:00
catlog22
f6cc3736b2 feat(cli): support stdin input for issue creation and solution commands 2025-12-30 14:51:25 +08:00
catlog22
6e99cd97ca feat(docs): update Bash tool usage to enforce foreground execution for CLI calls 2025-12-30 14:28:32 +08:00
catlog22
f566b8aabc feat(cli): add --debug/-d flag for CLI debugging
- Add -d/--debug option to ccw cli command
- Enable debug logging at runtime when flag is set
- Change DEBUG check from const to function for runtime evaluation
- Support debug mode for both exec and status subcommands
- Update help text to include --debug option

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:26:48 +08:00
catlog22
6efc499c77 feat(cli): add detailed debug logging for CLI execution
- Add debugLog and errorLog utility functions with DEBUG env control
- Add logging for tool availability check (TOOL_CHECK)
- Add logging for command building (BUILD_CMD)
- Add logging for process spawn (SPAWN, STDIN)
- Add logging for process completion (CLOSE, STATUS)
- Enhance error output with command details, exit code, and stderr
- Add troubleshooting hints for common failures
- Support DEBUG=true or CCW_DEBUG=true environment variables

Closes #46

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:17:39 +08:00
catlog22
2c675ee4db chore: bump version to 6.3.14
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 22:57:02 +08:00
catlog22
f6dfe28e08 refactor(issue): rename 'labels' to 'tags' in issue schemas and related code 2025-12-29 22:55:33 +08:00
catlog22
e8e8746cc6 refactor(issue): update brief mode to use 'labels' instead of 'tags' in issue listing 2025-12-29 22:47:55 +08:00
catlog22
603bc00bca refactor(issue): enhance documentation and add core guidelines for data access 2025-12-29 22:41:10 +08:00
catlog22
ae76926d5a feat(queue): support solution-based queues and update metadata handling 2025-12-29 22:14:06 +08:00
catlog22
fd48045fe3 Refactor issue management and history tracking
- Removed the interactive issue management command and its associated documentation.
- Enhanced the issue planning command to streamline project context reading and solution creation.
- Improved queue management with conflict clarification and status syncing from queues.
- Added functionality to track completed issues, moving them to a history file upon completion.
- Updated CLI options to support syncing issue statuses from queues.
- Introduced new API endpoint for retrieving completed issues from history.
- Enhanced error handling and validation for issue updates and queue management.
2025-12-29 21:42:06 +08:00
catlog22
6ec6643448 refactor(issue-plan-agent): enhance conflict detection and execution flow 2025-12-29 20:36:56 +08:00
catlog22
945fda2d14 docs(issue): update agent/prompts to use CLI endpoints
- issue-plan-agent.md: Use `ccw issue solution` instead of Bash echo
- issue-plan.md (codex): Use `ccw issue solution` endpoint
- issue-queue.md (codex): Remove assigned_executor from schema

All solution creation now uses the dedicated CLI endpoint for:
- Auto-increment ID: SOL-{issue-id}-{seq}
- Proper JSONL format with trailing newline
- Multi-solution support per issue

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 20:28:39 +08:00
catlog22
7d71f603fe feat(issue): add solution endpoint with auto-increment ID
- Add `ccw issue solution <id> --data '{...}'` for solution creation
- Add createSolution() with proper JSONL handling (trailing newline)
- Fix writeSolutions() to always add trailing newline
- Update plan.md to use CLI endpoint

Supports multiple solutions per issue with sequential IDs.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 20:24:31 +08:00
catlog22
bd11a538a7 docs(issue/new): update Phase 5 to use ccw issue create endpoint
Replace manual Bash echo with CLI endpoint documentation:
- Auto-increment ID: ISS-YYYYMMDD-NNN
- Proper JSONL format with trailing newline
- JSON output with created issue

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 20:16:24 +08:00
catlog22
b9b4da6d8c feat(issue): add create endpoint with auto-increment ID
- Add `ccw issue create --data '{...}'` for programmatic issue creation
- Add generateIssueId() for auto-increment: ISS-YYYYMMDD-NNN
- Add createIssue() with proper JSONL handling (trailing newline)
- Fix writeIssues() to always add trailing newline

Fixes JSONL format corruption when appending via shell echo.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 20:12:57 +08:00
catlog22
70f8b14eaa refactor(vector_store): use safer SQL query construction pattern
Replaces f-string interpolation with safer string formatting.
Adds documentation on SQL injection prevention.
No functional changes - parameterized queries still used.

Fixes: ISS-1766921318981-9

Solution-ID: SOL-1735386000-9
Issue-ID: ISS-1766921318981-9
Task-ID: T1
2025-12-29 20:09:49 +08:00
catlog22
0c8b2f2ec9 fix(vector_store): add bounds checking for chunk ID generation
Prevents potential integer overflow when start_id is near sys.maxsize.
Adds validation before range() calculation in batch insert methods.

Fixes: ISS-1766921318981-6

Solution-ID: SOL-1735386000-6
Issue-ID: ISS-1766921318981-6
Task-ID: T1
2025-12-29 20:02:19 +08:00
catlog22
d532b3fd02 refactor(queue): streamline output requirements and storage structure documentation 2025-12-29 19:54:10 +08:00
catlog22
c56104c082 fix(vector_store): add null check for ANN search results before filtering
Prevents errors when HNSW search returns null/empty results due to race conditions.
Adds validation for ids and distances before zip operation.

Fixes: ISS-1766921318981-5

Solution-ID: SOL-1735386000-5
Issue-ID: ISS-1766921318981-5
Task-ID: T1
2025-12-29 19:53:32 +08:00
catlog22
66ae1972ae refactor(issue): remove assigned_executor from QueueItem interface
Queue is an execution plan without executor assignment.
Executor is determined at runtime by /issue:execute command.

Changes:
- Remove assigned_executor from QueueItem interface
- Remove from dag nodes, list display, execution_hints
- Simplify queue list output (remove Executor column)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:49:25 +08:00
catlog22
7f4433e449 fix(vector_store): add parameter validation for min_score range
Validates min_score is within [0.0, 1.0] for cosine similarity.
Raises ValueError for out-of-range values to prevent unexpected filtering.

Fixes: ISS-1766921318981-14

Solution-ID: SOL-1735386000-14
Issue-ID: ISS-1766921318981-14
Task-ID: T1
2025-12-29 19:46:26 +08:00
catlog22
e1f2fc72d9 refactor(schema): remove assigned_executor from queue-schema
Queue produces execution plan without executor assignment.
Executor is determined at runtime by /issue:execute command.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:45:43 +08:00
catlog22
aa093f9468 refactor(issue/queue): remove assigned_executor field from schema
Executor assignment is not needed in solution schema - execution
context is determined at runtime.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:42:27 +08:00
catlog22
a27f76abcb refactor(issue/queue): simplify Phase 1 and Phase 5 with semantic descriptions
- Replace complex JavaScript code in Phase 1 with semantic bullet points
- Simplify Phase 5 validation code to semantic description
- Add Quality Checklist for completion verification
- Consistent style with plan.md optimizations

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:41:32 +08:00
catlog22
df34ef38d9 refactor(issue/plan): update semantic grouping limit to 4 issues per group and enhance conflict handling process 2025-12-29 19:38:45 +08:00
catlog22
60fbb4177c fix(config): add specific exception handling for path operations
Replaces generic Exception handling with specific PermissionError and OSError
handling in __post_init__ and ensure_runtime_dirs(). Provides clear diagnostic
messages to distinguish permission issues from other filesystem errors.

Solution-ID: SOL-1735385400008
Issue-ID: ISS-1766921318981-8
Task-ID: T1
2025-12-29 19:34:27 +08:00
catlog22
3289562be7 docs(issue/plan): add quality checklist for completion verification
Checklist items:
- Solution files exist for all issues
- Auto-binding for single solutions
- User selection for multi-solutions
- Tasks have modification_points
- Acceptance criteria quantified
- Conflicts detected
- Status updated to planned

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:32:19 +08:00
catlog22
73fc68a187 refactor(issue/plan): remove redundant file specs from command doc
Agent (issue-plan-agent.md) handles file generation.
Command doc should only describe input/output behavior.

Removed: Generate Files, Storage Structure, Completion Criteria
Kept: Command Output JSON format, Behavior summary

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:31:00 +08:00
catlog22
bce6fa7a91 refactor(issue/new): simplify clarification to open-ended prompt
Remove prescriptive options (Bug fix/New feature/Improvement)
that may interfere with natural issue description.

Now: single open-ended prompt for user to describe freely.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:28:03 +08:00
catlog22
88724a4df9 refactor(issue): simplify Issue schema and remove lifecycle_requirements
Schema changes:
- Remove lifecycle_requirements (deferred to plan agent)
- Remove solution_count (computed dynamically from solutions/*.jsonl)
- Keep context as single source of truth (remove problem_statement)
- Add feedback[] for failure history + human clarifications
- Add source, source_url, labels, expected/actual_behavior

Fields removed (unused downstream):
- lifecycle_requirements.test_strategy
- lifecycle_requirements.regression_scope
- lifecycle_requirements.acceptance_type
- lifecycle_requirements.commit_strategy
- solution_count (denormalized)

Fields added:
- feedback[]: { type, stage, content, created_at }
- source, source_url, labels
- expected_behavior, actual_behavior, affected_components

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:25:58 +08:00
catlog22
5914b1c5fc fix(vector-store): protect bulk insert mode transitions with lock
Ensure begin_bulk_insert() and end_bulk_insert() are fully
lock-protected to prevent TOCTOU race conditions.

Solution-ID: SOL-1735392000003
Issue-ID: ISS-1766921318981-12
Task-ID: T2
2025-12-29 19:20:02 +08:00
catlog22
d8be23fa83 fix(vector-store): add lock protection for bulk insert mode flag
Protect _bulk_insert_mode flag and accumulation lists with
_ann_write_lock to prevent corruption during concurrent access.

Solution-ID: SOL-1735392000003
Issue-ID: ISS-1766921318981-12
Task-ID: T1
2025-12-29 19:16:30 +08:00
catlog22
ffbc4a4b76 style(issue/new): use hybrid Phase + table flow diagram
Combines sequential Phase structure with inline table for branching:
- Phase 1-4 for overall flow clarity
- Table for Score 0/1-2/3 decision branching
- More compact and scannable than pure ASCII boxes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:16:25 +08:00
catlog22
dd62a7ac13 refactor(issue/new): make ACE search conditional on clarity
- ACE only for medium clarity (score 1-2), skip for:
  - GitHub URLs (score 3): already has context
  - Vague inputs (score 0): needs clarification first
- Limit to quick search: max 3 keywords, max 3 files
- Non-blocking: ACE failure continues without hints
- Note: Deep exploration deferred to /issue:plan

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:14:13 +08:00
catlog22
3f29dfd4cf refactor(issue/new): simplify command with clarity-based flow
Key changes:
- Add Clarity Detection (score 0-3) to determine question needs
- Remove mandatory Lifecycle Configuration questions (auto-detect)
- Integrate ACE tool for smart context discovery
- Ask only 1 question for vague inputs (clarityScore < 2)
- Direct creation for clear inputs (GitHub URL, structured text)
- Reduce from 6 phases to streamlined flow

Decision flow:
- Score 3: GitHub URL → parse → create directly
- Score 2: Structured text → parse + ACE → create directly
- Score 0-1: Vague → ask clarification → confirm → create

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:10:49 +08:00
catlog22
3fdd52742b fix(storage): handle rollback failures in batch operations
Adds nested exception handling in add_files() and _migrate_fts_to_external()
to catch and log rollback failures. Uses exception chaining to preserve both
transaction and rollback errors, preventing silent database inconsistency.

Solution-ID: SOL-1735385400010
Issue-ID: ISS-1766921318981-10
Task-ID: T1
2025-12-29 19:08:49 +08:00
catlog22
76ab4d67fe test(entities): add zero vector validation tests
Add comprehensive test coverage for zero and near-zero vector
detection in SemanticChunk embedding validation.

Solution-ID: SOL-20251228113612
Issue-ID: ISS-1766921318981-7
Task-ID: T2
2025-12-29 19:03:20 +08:00
catlog22
c859af1abf fix(entities): validate embeddings are non-zero vectors
Add L2 norm check to SemanticChunk.validate_embedding to reject
zero vectors. Prevents division by zero in cosine similarity
calculations downstream in vector search.

Solution-ID: SOL-20251228113612
Issue-ID: ISS-1766921318981-7
Task-ID: T1
2025-12-29 19:01:27 +08:00
catlog22
6a73d3c379 fix(search): handle path operation failures in symbol filtering
Adds robust exception handling for os.path.commonpath() in search_symbols()
to prevent crashes on malformed paths and Windows cross-drive scenarios.
Invalid symbols are skipped with debug logging, search continues.

Solution-ID: SOL-1735385400004
Issue-ID: ISS-1766921318981-4
Task-ID: T1
2025-12-29 18:59:10 +08:00
catlog22
5d5652c2c5 fix(sqlite-store): improve thread tracking in connection cleanup
Add fallback validation to detect dead threads missed by
threading.enumerate(), ensuring all stale connections are cleaned.

Solution-ID: SOL-1735392000002
Issue-ID: ISS-1766921318981-3
Task-ID: T2
2025-12-29 18:50:22 +08:00
catlog22
b958a1ea96 fix(sqlite-store): add periodic cleanup timer for connection pool
Implement background timer to proactively clean stale connections
every 5 minutes, preventing indefinite accumulation.

Solution-ID: SOL-1735392000002
Issue-ID: ISS-1766921318981-3
Task-ID: T1
2025-12-29 18:43:55 +08:00
catlog22
bc385a32fd test(storage): add TypeScript storage manager concurrency tests
Solution-ID: SOL-1735410004
Issue-ID: ISS-1766921318981-24
Task-ID: T4
2025-12-29 18:38:46 +08:00
catlog22
9a45732a39 test(codex-lens): add connection pool stress tests
Solution-ID: SOL-1735410004
Issue-ID: ISS-1766921318981-24
Task-ID: T3
2025-12-29 18:16:03 +08:00
catlog22
015b46e58b test(codex-lens): add concurrent write operation tests
Solution-ID: SOL-1735410004
Issue-ID: ISS-1766921318981-24
Task-ID: T2
2025-12-29 18:12:09 +08:00
catlog22
042a99dbe3 test(codex-lens): add concurrent read operation tests
Solution-ID: SOL-1735410004

Issue-ID: ISS-1766921318981-24

Task-ID: T1
2025-12-29 17:59:08 +08:00
catlog22
99291053f5 test(cli-executor): add end-to-end orchestration validation tests
Solution-ID: SOL-1735410003

Issue-ID: ISS-1766921318981-23

Task-ID: T4
2025-12-29 17:50:33 +08:00
catlog22
99eeeff6f7 test(cli-executor): add qwen/codex and multi-tool workflow tests
Solution-ID: SOL-1735410003

Issue-ID: ISS-1766921318981-23

Task-ID: T3
2025-12-29 17:36:50 +08:00
catlog22
883b9f0672 refactor(issue): unify Solution ID format to SOL-{issue-id}-{seq}
- Replace timestamp-based ID generation with issue-id-based format
- generateSolutionId() now accepts issueId and existing solutions
- Automatically calculates next sequence number (SOL-GH-123-1, -2, -3)
- Update taskAction and bindAction to use new format
- Ensures consistency with agent-generated IDs

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 17:33:12 +08:00
catlog22
3c07e743e1 fix(issue-plan-agent): ensure shell safety by escaping single quotes in solution JSON 2025-12-29 17:30:19 +08:00
catlog22
823e1dc487 test(cli-executor): add gemini workflow integration tests
Solution-ID: SOL-1735410003

Issue-ID: ISS-1766921318981-23

Task-ID: T2
2025-12-29 17:29:48 +08:00
catlog22
3537c0fc74 test(cli-executor): enhance solution registration and binding process 2025-12-29 17:21:00 +08:00
catlog22
f3e23f0a57 test(cli-executor): add integration test infrastructure
Solution-ID: SOL-1735410003

Issue-ID: ISS-1766921318981-23

Task-ID: T1
2025-12-29 17:15:15 +08:00
catlog22
3df1eac2fc test(ci): add visual regression testing workflow
Solution-ID: SOL-1735410002

Issue-ID: ISS-1766921318981-22

Task-ID: T4
2025-12-29 16:42:31 +08:00
catlog22
141472117d test(ui-tools): add visual regression tests for prototype instantiation
Solution-ID: SOL-1735410002

Issue-ID: ISS-1766921318981-22

Task-ID: T3
2025-12-29 16:37:10 +08:00
catlog22
e2dbeca080 test(ui-tools): add visual regression tests for preview generation
Solution-ID: SOL-1735410002

Issue-ID: ISS-1766921318981-22

Task-ID: T2
2025-12-29 16:15:12 +08:00
catlog22
70063f4045 test(ui-tools): add visual regression testing infrastructure
Solution-ID: SOL-1735410002
Issue-ID: ISS-1766921318981-22
Task-ID: T1
2025-12-29 15:47:08 +08:00
catlog22
8578d2d426 test(litellm): add integration tests for retry and rate limiting
Solution-ID: SOL-1735410001

Issue-ID: ISS-1766921318981-21

Task-ID: T3
2025-12-29 15:14:03 +08:00
catlog22
5d31bfd9fa test(litellm): add executor error scenario and validation tests
Solution-ID: SOL-1735410001

Issue-ID: ISS-1766921318981-21

Task-ID: T2
2025-12-29 13:28:11 +08:00
catlog22
c7291ba532 test(litellm): add comprehensive error scenario tests for client
Solution-ID: SOL-1735410001

Issue-ID: ISS-1766921318981-21

Task-ID: T1
2025-12-29 13:13:33 +08:00
catlog22
1396010437 fix(embedder): add lock protection for cache read operations
Protect fast path cache read in get_embedder() to prevent KeyError

during concurrent access and cache clearing operations.

Solution-ID: SOL-1735392000001

Issue-ID: ISS-1766921318981-2

Task-ID: T1
2025-12-29 12:33:23 +08:00
catlog22
1654b121bc test(routes): add integration tests for CodexLens and discovery routes
Solution-ID: SOL-1735386000005

Issue-ID: ISS-1766921318981-19

Task-ID: T4
2025-12-29 12:22:09 +08:00
catlog22
d5130fc4da test(routes): add integration tests for session and core-memory routes
Solution-ID: SOL-1735386000005

Issue-ID: ISS-1766921318981-19

Task-ID: T3
2025-12-29 11:58:00 +08:00
catlog22
c4f3afd8eb chore: bump version to 6.3.12
- Refactor issue workflow with unified solution ID format (SOL-{issue-id}-{seq})
- Add follow-up questions to issue creation flow
- Fix JSONL append newline handling
- Align conflicts format in plan.md with agent output

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:53:12 +08:00
catlog22
fb2f80ee3a fix(issue/plan): align conflicts format and add missing helper function
- Update Return Summary conflicts format to match Phase 3 processing requirements
- Add extractSelectedSolutionId helper function for solution selection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:48:47 +08:00
catlog22
dda6af130c refactor(issue): unify solution ID format to SOL-{issue-id}-{seq}
- Update solution-schema.json pattern to support new format
- Add Solution ID Format specification to plan.md
- Fix JSON parsing with extractJsonFromMarkdown + try-catch
- Update all examples in agent and prompt files:
  - issue-plan-agent.md
  - issue-queue-agent.md
  - issue-execute.md
  - issue-queue.md
  - queue.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:45:31 +08:00
catlog22
0d82c9fa03 refactor(issue): simplify extended_context and add follow-up questions
- Replace discovery_context with minimal extended_context (3 fields: location, suggested_fix, notes)
- Add Phase 4.5: intelligent follow-up questions for missing issue fields
- Fix JSONL append to ensure proper newline handling
- Update schema and plan.md to use new extended_context structure

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:33:59 +08:00
catlog22
7c389d5028 test(routes): add integration tests for CLI and memory routes
Solution-ID: SOL-1735386000005

Issue-ID: ISS-1766921318981-19

Task-ID: T2
2025-12-29 10:51:57 +08:00
catlog22
d5704f8344 test(routes): add integration tests for status and system routes
Solution-ID: SOL-1735386000005

Issue-ID: ISS-1766921318981-19

Task-ID: T1
2025-12-29 10:27:20 +08:00
catlog22
ec4018a930 test(embedding-batch): add tests for batch embedding operations
Solution-ID: SOL-1735386000004

Issue-ID: ISS-1766921318981-18

Task-ID: T4
2025-12-29 10:11:27 +08:00
catlog22
673cb03a2e test(semantic-search): add integration tests for semantic search workflow
Solution-ID: SOL-1735386000004

Issue-ID: ISS-1766921318981-18

Task-ID: T3
2025-12-29 09:59:26 +08:00
catlog22
4d7bf5b245 test(embedding-client): add unit tests for embedding generation
Solution-ID: SOL-1735386000004

Issue-ID: ISS-1766921318981-18

Task-ID: T2
2025-12-29 09:50:30 +08:00
catlog22
267426e332 test(core-memory-store): add unit tests for memory store operations
Solution-ID: SOL-1735386000004

Issue-ID: ISS-1766921318981-18

Task-ID: T1
2025-12-29 09:42:01 +08:00
catlog22
d68401fa1a test(core-memory-store): add assertion for missing memory retrieval 2025-12-29 09:35:52 +08:00
catlog22
eb4ba89693 feat(issue-plan): enhance conflict detection and resolution process with semantic grouping and user clarifications 2025-12-29 09:26:57 +08:00
catlog22
ef3b6b9f6e test(session-clustering): add integration tests for session clustering
Solution-ID: SOL-1735386000003

Issue-ID: ISS-1766921318981-17

Task-ID: T4
2025-12-29 09:03:50 +08:00
catlog22
2d1be7cd4f test(session-archive): add integration tests for archiving and cleanup
Solution-ID: SOL-1735386000003

Issue-ID: ISS-1766921318981-17

Task-ID: T3
2025-12-29 08:50:32 +08:00
catlog22
bf0a2bde34 test(session-content): add integration tests for session CRUD operations
Solution-ID: SOL-1735386000003

Issue-ID: ISS-1766921318981-17

Task-ID: T2
2025-12-29 08:44:09 +08:00
catlog22
d85ab2a12c test(session-lifecycle): add integration tests for session creation
Solution-ID: SOL-1735386000003

Issue-ID: ISS-1766921318981-17

Task-ID: T1
2025-12-29 08:39:32 +08:00
catlog22
33a2bdb9f0 test(browser-launcher): add cross-platform browser launch tests
Solution-ID: SOL-1735386000002

Issue-ID: ISS-1766921318981-16

Task-ID: T4
2025-12-29 00:19:37 +08:00
catlog22
11a7dcb6c8 test(file-utils): add unit tests for file operations
Solution-ID: SOL-1735386000002

Issue-ID: ISS-1766921318981-16

Task-ID: T3
2025-12-29 00:11:57 +08:00
catlog22
d8e389df00 test(path-validator): add unit tests for path security validation
Solution-ID: SOL-1735386000002

Issue-ID: ISS-1766921318981-16

Task-ID: T2
2025-12-29 00:09:33 +08:00
catlog22
203b51527b test(path-resolver): add unit tests for path resolution and validation
Solution-ID: SOL-1735386000002

Issue-ID: ISS-1766921318981-16

Task-ID: T1
2025-12-29 00:05:52 +08:00
catlog22
bf05886770 fix(queue): streamline validation and status update logic in queue processing 2025-12-28 23:47:26 +08:00
catlog22
079ecdad3e test(commands): add unit tests for session and server commands
Solution-ID: SOL-1735386000001

Issue-ID: ISS-1766921318981-15

Task-ID: T4
2025-12-28 23:47:13 +08:00
catlog22
075a8357cd test(core-memory-command): add unit tests for core memory module
Solution-ID: SOL-1735386000001

Issue-ID: ISS-1766921318981-15

Task-ID: T3
2025-12-28 23:08:54 +08:00
catlog22
c99ad377c6 test(memory-command): add unit tests for memory module
Solution-ID: SOL-1735386000001

Issue-ID: ISS-1766921318981-15

Task-ID: T2
2025-12-28 23:01:40 +08:00
catlog22
382d330525 fix(issue): improve queue archiving logic to handle empty tasks and solutions 2025-12-28 22:56:51 +08:00
catlog22
e2f4241b2e feat(cli-stream): add search functionality and improve validation in CLI Stream Viewer 2025-12-28 22:52:32 +08:00
catlog22
32cea006b9 Add initial implementation of the Docsify shell template for interactive software manuals 2025-12-28 22:46:43 +08:00
catlog22
6ffac8810b test(cli-command): add unit tests for CLI command executor
Solution-ID: SOL-1735386000001

Issue-ID: ISS-1766921318981-15

Task-ID: T1
2025-12-28 22:44:47 +08:00
catlog22
84d06f4273 fix(registry): normalize path case for comparison on Windows
Adds case normalization for path comparison on Windows to handle
case-insensitive filesystem behavior. Preserves case-sensitivity on Unix.

Fixes: ISS-1766921318981-13

Solution-ID: SOL-1735386000-13
Issue-ID: ISS-1766921318981-13
Task-ID: T1
2025-12-28 21:51:23 +08:00
catlog22
18cc536f65 refactor(vector-store): use consistent EPSILON constant
Define module-level EPSILON constant and use it in both
_cosine_similarity and _refresh_cache for consistent
floating point precision handling.

Solution-ID: SOL-20251228113619
Issue-ID: ISS-1766921318981-11
Task-ID: T3
2025-12-28 21:40:46 +08:00
catlog22
af2ff54cb7 test(vector-store): add epsilon tolerance edge case tests
Add comprehensive test coverage for near-zero norms, product
underflow, and floating point precision edge cases in
_cosine_similarity function.

Solution-ID: SOL-20251228113619
Issue-ID: ISS-1766921318981-11
Task-ID: T2
2025-12-28 21:37:59 +08:00
catlog22
6486c56850 fix(vector-store): add epsilon tolerance for norm checks
Replace exact zero comparison with epsilon-based check (< 1e-10)
in _cosine_similarity to handle floating point precision issues.
Also check for product underflow to prevent inf/nan from division
by very small numbers.

Solution-ID: SOL-20251228113619
Issue-ID: ISS-1766921318981-11
Task-ID: T1
2025-12-28 21:11:30 +08:00
catlog22
93dcdd2293 fix(config): log configuration loading errors instead of silently ignoring
Replaces bare exception handler in load_settings() with logging.warning()
to help users debug configuration file issues (syntax errors, permissions).
Maintains backward compatibility - errors do not break initialization.

Solution-ID: SOL-1735385400001
Issue-ID: ISS-1766921318981-1
Task-ID: T1
2025-12-28 21:06:23 +08:00
catlog22
58caccb250 test(ranking): add edge case tests for normalize_weights
Add comprehensive test coverage for NaN, infinity, and all-None
edge cases in weight normalization to prevent regression.

Solution-ID: SOL-20251228113631
Issue-ID: ISS-1766921318981-0
Task-ID: T2
2025-12-28 20:59:08 +08:00
catlog22
598eed92cb fix(ranking): add explicit NaN check in normalize_weights
Add math.isnan() check before math.isfinite() to properly catch
NaN values in weight totals. Prevents division by NaN which could
produce unexpected results in RRF fusion calculations.

Solution-ID: SOL-20251228113631
Issue-ID: ISS-1766921318981-0
Task-ID: T1
2025-12-28 20:55:03 +08:00
catlog22
d3e7ecca21 feat: 添加任务跟踪功能,初始化待办事项列表并更新任务状态 2025-12-28 20:50:24 +08:00
catlog22
847abcefce feat: 添加选项以标记任务为失败 2025-12-28 20:45:05 +08:00
catlog22
c24ad501b5 feat: 更新问题执行和队列生成逻辑,支持解决方案格式并增强元数据管理 2025-12-28 20:35:29 +08:00
catlog22
35c7fe28bb feat: 更新队列生成逻辑,使用提供的队列ID并严格限制输出文件 2025-12-28 20:20:13 +08:00
catlog22
a33cacfd75 feat: 添加更新命令以修改问题字段(状态、优先级、标题等) 2025-12-28 20:14:31 +08:00
catlog22
338c3d612c feat: 更新问题规划和队列命令,增强解决方案注册和用户选择逻辑 2025-12-28 19:58:44 +08:00
catlog22
8b17fad723 feat(discovery): enhance discovery progress reading with new schema support 2025-12-28 19:33:17 +08:00
catlog22
169f218f7a feat(discovery): enhance discovery index reading and issue exporting
- Improved the reading of the discovery index by adding a fallback mechanism to scan directories for discovery folders if the index.json is invalid or missing.
- Added sorting of discoveries by creation time in descending order.
- Enhanced the `appendToIssuesJsonl` function to include deduplication logic for issues based on ID and source finding ID.
- Updated the discovery route handler to reflect the number of issues added and skipped during export.
- Introduced UI elements for selecting and deselecting findings in the dashboard.
- Added CSS styles for exported findings and action buttons.
- Implemented search functionality for filtering findings based on title, file, and description.
- Added internationalization support for new UI elements.
- Created scripts for automated API extraction from various project types, including FastAPI and TypeScript.
- Documented the API extraction process and library bundling instructions.
2025-12-28 19:27:34 +08:00
catlog22
3ef1e54412 feat: 更新软件手册,优化截图捕获流程和规则说明 2025-12-28 18:19:39 +08:00
catlog22
4419c50942 feat: enhance internationalization support and improve GPU mode selector with Python environment checks 2025-12-28 17:49:40 +08:00
catlog22
7aa1cda367 feat: add issue discovery view for managing discovery sessions and findings
- Implemented main render function for the issue discovery view.
- Added data loading functions to fetch discoveries, details, findings, and progress.
- Created rendering functions for discovery list and detail sections.
- Introduced filtering and searching capabilities for findings.
- Implemented actions for exporting and dismissing findings.
- Added polling mechanism to track discovery progress.
- Included utility functions for HTML escaping and cleanup.
2025-12-28 17:21:07 +08:00
catlog22
a2c88ba885 feat: Add project guidelines support and enhance project overview rendering 2025-12-28 14:50:50 +08:00
catlog22
e16950ef1e refactor: Remove unused context-tools-ace.md and clean up CLI status management 2025-12-28 14:09:51 +08:00
catlog22
5b973b00ea feat(issue): Enhance queue management with solution-level granularity and improved item identification 2025-12-28 13:58:43 +08:00
catlog22
3a1ebf8684 refactor(issue): Simplify issue and task structures by removing unused fields 2025-12-28 13:39:52 +08:00
catlog22
2eaefb61ab feat: Enhance issue management to support solution-level queues
- Added support for solution-level queues in the issue management system.
- Updated interfaces to include solution-specific properties such as `approach`, `task_count`, and `files_touched`.
- Modified queue handling to differentiate between task-level and solution-level items.
- Adjusted rendering logic in the dashboard to display solutions and their associated tasks correctly.
- Enhanced queue statistics and conflict resolution to accommodate the new solution structure.
- Updated actions (next, done, retry) to handle both tasks and solutions seamlessly.
2025-12-28 13:21:34 +08:00
catlog22
4c6b28030f Enhance project management workflow by introducing dual file system for project guidelines and tech analysis
- Updated workflow initialization to create `.workflow/project-tech.json` and `.workflow/project-guidelines.json` for comprehensive project understanding.
- Added mandatory context reading steps in various commands to ensure compliance with user-defined constraints and technology stack.
- Implemented a new command `/workflow:session:solidify` to capture session learnings and solidify them into project guidelines.
- Introduced a detail action in issue management to retrieve task details without altering status.
- Enhanced documentation across multiple workflow commands to reflect changes in project structure and guidelines.
2025-12-28 12:47:39 +08:00
catlog22
2c42cefa5a feat(issue): add DAG support for parallel execution planning and enhance task fetching 2025-12-28 12:04:10 +08:00
catlog22
35ffd3419e chore(release): v6.3.9 - Issue System Consistency
- Unified four-layer architecture (Schema/Agent/Command/Implementation)
- Upgraded to Rich Plan model with lifecycle fields
- Added multi-solution generation support
- Consolidated schemas (deleted redundant issue-task-jsonl-schema, solutions-jsonl-schema)
- Fixed field naming consistency (acceptance, lifecycle_status, priority mapping)
- Added search tool fallback chain to issue-plan-agent

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:57:30 +08:00
catlog22
e3223edbb1 fix(plan): Update delivery criteria terminology to acceptance.criteria 2025-12-27 23:54:00 +08:00
catlog22
a061fc1428 fix(issue-plan-agent): Update acceptance criteria terminology and enhance issue loading process with metadata 2025-12-27 23:51:30 +08:00
catlog22
0992d27523 refactor(issue-manager): Enhance queue detail item styling and update modal content 2025-12-27 23:43:40 +08:00
catlog22
5aa0c9610d fix(issue-manager): Add History button to empty queue state
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:00:17 +08:00
catlog22
7620ff703d feat(issue-manager): Add queue history modal for viewing and switching queues
- Add GET /api/queue/history endpoint to fetch all queues from index
- Add GET /api/queue/:id endpoint to fetch specific queue details
- Add POST /api/queue/switch endpoint to switch active queue
- Add History button in queue toolbar
- Add queue history modal with list view and detail view
- Add switch functionality to change active queue
- Add CSS styles for queue history components

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:56:32 +08:00
catlog22
d705a3e7d9 fix: Add active_queue_id to QueueIndex interface
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:48:38 +08:00
catlog22
726151bfea Refactor issue management commands and introduce lifecycle requirements
- Updated lifecycle requirements in issue creation to include new fields for testing, regression, acceptance, and commit strategies.
- Enhanced the planning command to generate structured output and handle multi-solution scenarios.
- Improved queue formation logic to ensure valid DAG and conflict resolution.
- Introduced a new interactive issue management skill for CRUD operations, allowing users to manage issues through a menu-driven interface.
- Updated documentation across commands to reflect changes in task structure and output requirements.
2025-12-27 22:44:49 +08:00
catlog22
b58589ddad refactor: Update issue queue structure and commands
- Changed queue structure from 'queue' to 'tasks' in various files for clarity.
- Updated CLI commands to reflect new task ID usage instead of queue ID.
- Enhanced queue management with new delete functionality for historical queues.
- Improved metadata handling and task execution tracking.
- Updated dashboard and issue manager views to accommodate new task structure.
- Bumped version to 6.3.8 in package.json and package-lock.json.
2025-12-27 22:04:15 +08:00
catlog22
2e493277a1 feat(issue-queue): Enhance task execution flow with priority handling and stuck task reset option 2025-12-27 14:43:18 +08:00
catlog22
8b19edd2de chore: bump version to 6.3.6
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 11:50:35 +08:00
catlog22
3e54b5f7d8 feat(issue-execute): Implement sequential task execution with detailed lifecycle and commit process 2025-12-27 11:46:18 +08:00
catlog22
4da06864f8 feat: Enhance issue and solution management with new UI components and functionality
- Added internationalization support for new issue and solution-related strings in i18n.js.
- Implemented a solution detail modal in issue-manager.js to display solution information and bind/unbind actions.
- Enhanced the skill loading function to combine project and user skills in hook-manager.js.
- Improved queue rendering logic to handle empty states and display queue statistics in issue-manager.js.
- Introduced command modals for queue operations, allowing users to generate execution queues via CLI commands.
- Added functionality to auto-generate issue IDs and regenerate them in the create issue modal.
- Implemented detailed rendering of solution tasks, including acceptance criteria and modification points.
2025-12-27 11:27:45 +08:00
catlog22
8f310339df feat(issue-management): Implement interactive issue management command with CRUD operations
- Added `/issue:manage` command for interactive issue management via CLI.
- Implemented features for listing, viewing, editing, deleting, and bulk operations on issues.
- Integrated GitHub issue fetching and text description parsing for issue creation.
- Enhanced user experience with menu-driven interface and structured output.
- Created helper functions for parsing user input and managing issue data.
- Added error handling and related command references for better usability.

feat(issue-creation): Introduce structured issue creation from GitHub URL or text description

- Added `/issue:new` command to create structured issues from GitHub issues or text descriptions.
- Implemented parsing logic for extracting key elements from issue descriptions.
- Integrated user confirmation for issue creation with options to edit title and priority.
- Ensured proper writing of issues to `.workflow/issues/issues.jsonl` with metadata.
- Included examples and error handling for various input scenarios.
2025-12-27 10:20:34 +08:00
catlog22
0157e36344 feat: add CLI Stream Viewer component for real-time output monitoring
- Implemented a new CLI Stream Viewer to display real-time output from CLI executions.
- Added state management for CLI executions, including handling of start, output, completion, and errors.
- Introduced UI rendering for stream tabs and content, with auto-scroll functionality.
- Integrated keyboard shortcuts for toggling the viewer and handling user interactions.

feat: create Issue Manager view for managing issues and execution queue

- Developed the Issue Manager view to manage issues, solutions, and execution queue.
- Implemented data loading functions for fetching issues and queue data from the API.
- Added filtering and rendering logic for issues and queue items, including drag-and-drop functionality.
- Created detail panel for viewing and editing issue details, including tasks and solutions.
2025-12-27 09:46:12 +08:00
catlog22
cdf4833977 feat(issue): implement JSONL task generation and management for issue resolution
- Added `/issue:plan` command to generate a structured task plan from GitHub issues or descriptions, including delivery and pause criteria, and a dependency graph.
- Introduced JSONL schema for task entries to enforce structure and validation.
- Developed comprehensive issue command with functionalities for initializing, listing, adding, updating, and exporting tasks.
- Implemented error handling and user feedback for various operations within the issue management workflow.
- Enhanced task management with priority levels, phase results, and executor preferences.
2025-12-26 17:21:32 +08:00
catlog22
c8a914aeca Refactor agent configurations and context gathering processes across multiple workflow tools
- Removed agent references in context-gather and test-context-gather commands for clarity.
- Updated test-task-generate to streamline agent configuration references.
- Enhanced action-planning-agent documentation by removing redundant examples.
- Adjusted execute command to eliminate direct agent path references.
- Improved context-gather documentation to clarify agent autonomy and project.json integration.
- Revised test-context-gather to focus on agent delegation and coverage analysis.
- Cleaned up test-task-generate to focus on task generation rules without direct agent references.
- Implemented automatic agent assignment based on exploration file names in deep analysis phase.
- Expanded project exploration phase to include intelligent angle selection based on software type.
- Enhanced output schemas and success criteria for exploration tasks to ensure clarity and completeness.
2025-12-26 16:20:46 +08:00
catlog22
a5ba7c0f6c feat: 更新版本号至6.3.5 2025-12-26 15:43:47 +08:00
catlog22
1cf0d92ec2 feat: 更新冲突解决文档和模式,增加输出模式和策略要求,优化JSON架构 2025-12-26 15:40:40 +08:00
catlog22
02930bd56b feat: 增强任务生成文档,添加用户配置、CLI工具选择和执行策略,优化模块依赖处理 2025-12-26 15:23:41 +08:00
catlog22
4061ae48c4 feat: Implement adaptive RRF weights and query intent detection
- Added integration tests for adaptive RRF weights in hybrid search.
- Enhanced query intent detection with new classifications: keyword, semantic, and mixed.
- Introduced symbol boosting in search results based on explicit symbol matches.
- Implemented embedding-based reranking with configurable options.
- Added global symbol index for efficient symbol lookups across projects.
- Improved file deletion handling on Windows to avoid permission errors.
- Updated chunk configuration to increase overlap for better context.
- Modified package.json test script to target specific test files.
- Created comprehensive writing style guidelines for documentation.
- Added TypeScript tests for query intent detection and adaptive weights.
- Established performance benchmarks for global symbol indexing.
2025-12-26 15:08:47 +08:00
catlog22
ecd5085e51 feat: 优化历史记录输出,增加工具使用统计和过滤提示信息 2025-12-26 12:28:48 +08:00
catlog22
6bc8b7de95 feat: 优化历史记录输出格式,增加提示信息并调整提示预览显示 2025-12-26 12:21:55 +08:00
catlog22
e79e33773f feat: 优化 CLI 历史记录输出格式,增加使用提示并规范化 sourceDir 处理 2025-12-26 12:18:52 +08:00
catlog22
0c0301d811 Refactor project analysis phases: remove diagram generation phase, enhance report generation with detailed structure and quality checks, and introduce consolidation agent for cross-module analysis. Update CLI commands to support final output options and improve history management with copy functionality. 2025-12-26 12:13:27 +08:00
catlog22
89f6ac6804 feat: Implement multi-phase project analysis workflow with Mermaid diagram generation and CPCC compliance documentation
- Phase 3: Added Mermaid diagram generation for system architecture, function modules, algorithms, class diagrams, sequence diagrams, and error flows.
- Phase 4: Assembled analysis and diagrams into a structured CPCC-compliant document with section templates and figure numbering.
- Phase 5: Developed compliance review process with iterative refinement based on analysis findings and user feedback.
- Added CPCC compliance requirements and quality standards for project analysis reports.
- Established a comprehensive project analysis skill with detailed execution flow and report types.
- Enhanced error handling and recovery mechanisms throughout the analysis phases.
2025-12-26 11:44:29 +08:00
catlog22
f14c3299bc docs: add Windows installation requirements
- Add requirements table for all platforms
- Note about better-sqlite3 native compilation
- Recommend Node.js LTS versions to avoid build issues
- Update version badge to 6.3.4

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 09:23:28 +08:00
catlog22
a73828b4d6 chore: bump version to 6.3.4
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 22:37:39 +08:00
catlog22
6244bf0405 feat: 更新 CLI 文档,增加背景执行后的提示信息 2025-12-25 22:35:39 +08:00
catlog22
90852c7788 feat: 移除 CLI 工具使用文档中的流式输出和缓存相关内容,简化说明 2025-12-25 22:30:09 +08:00
catlog22
3b842ed290 feat(cli-executor): add streaming option and enhance output handling
- Introduced a `stream` parameter to control output streaming vs. caching.
- Enhanced status determination logic to prioritize valid output over exit codes.
- Updated output structure to include full stdout and stderr when not streaming.

feat(cli-history-store): extend conversation turn schema and migration

- Added `cached`, `stdout_full`, and `stderr_full` fields to the conversation turn schema.
- Implemented database migration to add new columns if they do not exist.
- Updated upsert logic to handle new fields.

feat(codex-lens): implement global symbol index for fast lookups

- Created `GlobalSymbolIndex` class to manage project-wide symbol indexing.
- Added methods for adding, updating, and deleting symbols in the global index.
- Integrated global index updates into directory indexing processes.

feat(codex-lens): optimize search functionality with global index

- Enhanced `ChainSearchEngine` to utilize the global symbol index for faster searches.
- Added configuration option to enable/disable global symbol indexing.
- Updated tests to validate global index functionality and performance.
2025-12-25 22:22:31 +08:00
catlog22
673e1d117a chore: bump version to 6.3.2
- Clarify adaptive planning strategy in lite-plan.md

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:33:27 +08:00
catlog22
f64f619713 chore: bump version to 6.3.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:19:30 +08:00
catlog22
a742fa0f8a feat: 将 Code Index MCP 提供者的按钮更改为下拉选择框,优化用户界面 2025-12-25 20:15:15 +08:00
catlog22
6894c7e80b feat: 更新 Code Index MCP 提供者支持,修改 CLAUDE.md 和相关样式 2025-12-25 20:12:45 +08:00
catlog22
203100431b feat: 添加 Code Index MCP 提供者支持,更新相关 API 和配置 2025-12-25 19:58:42 +08:00
catlog22
e8b9bcae92 feat: Add ccw-litellm uninstall button and fix npm install path resolution
- Fix ccw-litellm path lookup for npm distribution by adding PACKAGE_ROOT
- Add uninstall button to API Settings page for ccw-litellm
- Add /api/litellm-api/ccw-litellm/uninstall endpoint

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 18:29:57 +08:00
catlog22
052351ab5b fix: 删除不再需要的 prompts.zip 文件 2025-12-25 18:17:49 +08:00
catlog22
9dd84e3416 fix: Update agent execution instructions and improve rendering layout in API settings 2025-12-25 18:13:28 +08:00
catlog22
211c25d969 fix: Use pip show for more reliable ccw-litellm detection
- Primary method: pip show ccw-litellm (most reliable)
- Fallback: Python import with simpler syntax
- Increased timeout for pip show to 10s

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:57:34 +08:00
catlog22
275684d319 fix: Load embedding pool config before rendering sidebar
Ensures the sidebar summary displays correctly on page load

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:55:05 +08:00
catlog22
0f8a47e8f6 fix: Add shell:true for Windows PATH resolution in ccw-litellm status check
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:50:00 +08:00
catlog22
303c840464 fix: Remove invalid i18n key from Embedding Pool UI
Removed 'apiSettings.configuration' heading that was showing raw key

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:43:29 +08:00
catlog22
b15008fbce feat: Enhance Embedding Pool UI with sidebar summary
- Add renderEmbeddingPoolSidebar() for config summary display
- Show status, target model, strategy, and provider stats
- Improve visual hierarchy with icon indicators
- Update sidebar rendering for embedding-pool tab

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:39:15 +08:00
catlog22
a8cf3e1ad6 feat: Refactor embedding pool sidebar rendering and always load semantic dependencies status 2025-12-25 17:36:11 +08:00
catlog22
0515ef6e8b refactor: Simplify CodexLens rotation UI, link to API Settings
- Simplify rotation section to show status only
- Add link to navigate to API Settings Embedding Pool
- Update loadRotationStatus to read from embedding-pool API
- Remove detailed modal in favor of API Settings config
- Add i18n translations for 'Configure in API Settings'

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:29:44 +08:00
catlog22
777d5df573 feat: Add aggregated endpoint for CodexLens dashboard initialization and improve loading performance 2025-12-25 17:22:42 +08:00
catlog22
c5f379ba01 fix: Force refresh ccw-litellm status on first page load
- Add isFirstApiSettingsRender flag to track first load
- Force refresh ccw-litellm status on first page load
- Add ?refresh=true query param support to backend API
- Frontend passes refresh param to bypass backend cache
- Subsequent tab switches still use cache for performance

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:18:23 +08:00
catlog22
145d38c9bd feat: Implement venv status caching with TTL and clear cache on install/uninstall 2025-12-25 17:13:07 +08:00
catlog22
eab957ce00 perf: Optimize API Settings page loading performance
- Add forceRefresh parameter to loadApiSettings() with caching
- Implement 60s TTL cache for ccwLitellmStatus check
- Tab switching now uses cached data (0 network requests)
- Clear cache after save/delete operations for data consistency
- Response time reduced from 100-500ms to <10ms on tab switch

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:11:58 +08:00
catlog22
b5fb077ad6 fix: Improve Embedding Pool UI styling
- Add dedicated CSS for embedding-pool-main-panel
- Style discovered providers list with proper cards
- Fix toggle switch visibility
- Add info-message component styling
- Update renderDiscoveredProviders() to use CSS classes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:57:33 +08:00
catlog22
ebcbb11cb2 feat: Enhance CodexLens search functionality with new parameters and result handling
- Added search limit, content length, and extra files input fields in the CodexLens manager UI.
- Updated API request parameters to include new fields: max_content_length and extra_files_count.
- Refactored smart-search.ts to support new parameters with default values.
- Implemented result splitting logic to return both full content and additional file paths.
- Updated CLI commands to remove worker limits and allow dynamic scaling based on endpoint count.
- Introduced EmbeddingPoolConfig for improved embedding management and auto-discovery of providers.
- Enhanced search engines to utilize new parameters for fuzzy and exact searches.
- Added support for embedding single texts in the LiteLLM embedder.
2025-12-25 16:16:44 +08:00
catlog22
a1413dd1b3 feat: Unified Embedding Pool with auto-discovery
Architecture refactoring for multi-provider rotation:

Backend:
- Add EmbeddingPoolConfig type with autoDiscover support
- Implement discoverProvidersForModel() for auto-aggregation
- Add GET/PUT /api/litellm-api/embedding-pool endpoints
- Add GET /api/litellm-api/embedding-pool/discover/:model preview
- Convert ccw-litellm status check to async with 5-min cache
- Maintain backward compatibility with legacy rotation config

Frontend:
- Add "Embedding Pool" tab in API Settings
- Auto-discover providers when target model selected
- Show provider/key count with include/exclude controls
- Increase sidebar width (280px → 320px)
- Add sync result feedback on save

Other:
- Remove worker count limits (was max=32)
- Add i18n translations (EN/CN)
- Update .gitignore for .mcp.json

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:06:49 +08:00
catlog22
4e6ee2db25 chore: stop tracking .mcp.json (already in .gitignore) 2025-12-25 16:05:18 +08:00
catlog22
8e744597d1 feat: Implement CodexLens multi-provider embedding rotation management
- Added functions to get and update CodexLens embedding rotation configuration.
- Introduced functionality to retrieve enabled embedding providers for rotation.
- Created endpoints for managing rotation configuration via API.
- Enhanced dashboard UI to support multi-provider rotation configuration.
- Updated internationalization strings for new rotation features.
- Adjusted CLI commands and embedding manager to support increased concurrency limits.
- Modified hybrid search weights for improved ranking behavior.
2025-12-25 14:13:27 +08:00
catlog22
dfa8b541b4 fix: 修复语义依赖检测 Python 代码缩进错误
之前的 commit 3c3ce55 错误地在 checkSemanticStatus 的 Python 代码
每行前添加了一个空格,导致 Python IndentationError,使得前端
始终显示"语义搜索依赖未安装"。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 13:21:51 +08:00
catlog22
1dc55f8811 feat(ui): 支持自定义 API 并发数 (1-32 workers)
- 添加 codexlens.concurrency 和 concurrencyHint 翻译 (中英文)
- 将 worker 下拉菜单改为数字输入框,支持 1-32 范围
- 添加 validateConcurrencyInput 输入验证函数
- 默认值 4 workers,显示推荐提示

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 13:11:51 +08:00
catlog22
501d9a05d4 fix: 修复 ModelScope API 路由 bug 导致的 Ollama 连接错误
- 添加 _sanitize_text() 方法处理以 'import' 开头的文本
- ModelScope 后端错误地将此类文本路由到本地 Ollama 端点
- 通过在文本前添加空格绕过路由检测,不影响嵌入质量
- 增强 embedding_manager.py 的重试逻辑和错误处理
- 在 commands.py 中成功生成后调用全局模型锁定

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 12:52:43 +08:00
catlog22
229d51cd18 feat: 添加全局模型锁定功能,防止不同模型混合使用,增强嵌入生成的稳定性 2025-12-25 11:20:05 +08:00
catlog22
40e61b30d6 feat: 添加多端点支持和负载均衡功能,增强 LiteLLM 嵌入管理 2025-12-25 11:01:08 +08:00
catlog22
3c3ce55842 feat: 添加对 LiteLLM 嵌入后端的支持,增强并发 API 调用能力 2025-12-24 22:20:13 +08:00
catlog22
e3e61bcae9 feat: Enhance LiteLLM integration and CLI management
- Added token estimation and batching functionality in LiteLLMEmbedder to handle large text inputs efficiently.
- Updated embed method to support max_tokens_per_batch parameter for better API call management.
- Introduced new API routes for managing custom CLI endpoints, including GET, POST, PUT, and DELETE methods.
- Enhanced CLI history component to support source directory context for native session content.
- Improved error handling and logging in various components for better debugging and user feedback.
- Added internationalization support for new API endpoint features in the i18n module.
- Updated CodexLens CLI commands to allow for concurrent API calls with a max_workers option.
- Enhanced embedding manager to track model information and handle embeddings generation more robustly.
- Added entry points for CLI commands in the package configuration.
2025-12-24 18:01:26 +08:00
catlog22
dfca4d60ee feat: 添加 LiteLLM 嵌入后端支持及相关配置选项 2025-12-24 16:41:04 +08:00
catlog22
e671b45948 feat: Enhance configuration management and embedding capabilities
- Added JSON-based settings management in Config class for embedding and LLM configurations.
- Introduced methods to save and load settings from a JSON file.
- Updated BaseEmbedder and its subclasses to include max_tokens property for better token management.
- Enhanced chunking strategy to support recursive splitting of large symbols with improved overlap handling.
- Implemented comprehensive tests for recursive splitting and chunking behavior.
- Added CLI tools configuration management for better integration with external tools.
- Introduced a new command for compacting session memory into structured text for recovery.
2025-12-24 16:32:27 +08:00
catlog22
b00113d212 feat: Enhance embedding management and model configuration
- Updated embedding_manager.py to include backend parameter in model configuration.
- Modified model_manager.py to utilize cache_name for ONNX models.
- Refactored hybrid_search.py to improve embedder initialization based on backend type.
- Added backend column to vector_store.py for better model configuration management.
- Implemented migration for existing database to include backend information.
- Enhanced API settings implementation with comprehensive provider and endpoint management.
- Introduced LiteLLM integration guide detailing configuration and usage.
- Added examples for LiteLLM usage in TypeScript.
2025-12-24 14:03:59 +08:00
catlog22
9b926d1a1e docs: Sync README_CN.md with English version
- Add Smithery badge
- Update project description to match English (JSON-driven multi-agent framework)
- Change installation from script to npm install (recommended)
- Minor text adjustments for consistency

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:03:45 +08:00
catlog22
98c9f1a830 fix: Add api-settings to server.ts MODULE_FILES array
server.ts has a duplicate MODULE_FILES/MODULE_CSS_FILES array separate
from dashboard-generator.ts. The api-settings files were missing from
this duplicate list, causing renderApiSettings to be undefined.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:14:27 +08:00
catlog22
46ac591fe8 Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2025-12-23 20:46:01 +08:00
catlog22
bf66b095c7 feat: Add unified LiteLLM API management with dashboard UI and CLI integration
- Create ccw-litellm Python package with AbstractEmbedder and AbstractLLMClient interfaces
- Add BaseEmbedder abstraction and factory pattern to codex-lens for pluggable backends
- Implement API Settings dashboard page for provider credentials and custom endpoints
- Add REST API routes for CRUD operations on providers and endpoints
- Extend CLI with --model parameter for custom endpoint routing
- Integrate existing context-cache for @pattern file resolution
- Add provider model registry with predefined models per provider type
- Include i18n translations (en/zh) for all new UI elements

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:36:32 +08:00
catlog22
5228581324 feat: Add context_cache MCP tool with simplified CLI options
Add context_cache MCP tool for caching files by @patterns:
- pattern-parser.ts: Parse @expressions using glob
- context-cache-store.ts: In-memory cache with TTL/LRU
- context-cache.ts: MCP tool with pack/read/status/release/cleanup

Simplify CLI cache options:
- --cache now uses comma-separated format instead of JSON
- Items starting with @ are patterns, others are text content
- Add --inject-mode option (none/full/progressive)
- Default: codex=full, gemini/qwen=none

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 19:54:05 +08:00
catlog22
c9c704e671 Merge pull request #42 from rhyme227/fix/cross-platform-path-handling
fix(hooks): correct cross-platform path handling in getProjectSettingsPath
2025-12-23 18:49:35 +08:00
catlog22
16d4c7c646 feat: 增加写模式协议的提示结构 2025-12-23 18:49:04 +08:00
catlog22
39056292b7 feat: Add CodexLens Manager to dashboard and enhance GPU management
- Introduced a new CodexLens Manager item in the dashboard for easier access.
- Implemented GPU management commands in the CLI, including listing available GPUs, selecting a specific GPU, and resetting to automatic detection.
- Enhanced the embedding generation process to utilize GPU resources more effectively, including batch size optimization for better performance.
- Updated the embedder to support device ID options for GPU selection, ensuring compatibility with DirectML and CUDA.
- Added detailed logging and error handling for GPU detection and selection processes.
- Updated package version to 6.2.9 and added comprehensive documentation for Codex Agent Execution Protocol.
2025-12-23 18:35:30 +08:00
rhyme
87ffd283ce fix(hooks): correct cross-platform path handling in getProjectSettingsPath
Remove incorrect path separator conversion that caused directory creation
issues on Linux/WSL platforms. The function was converting forward slashes
to backslashes, which are treated as literal filename characters on Unix
systems rather than path separators.

Changes:
- Remove manual path normalization in getProjectSettingsPath()
- Rely on Node.js path.join() for cross-platform compatibility
- Fix affects both hooks-routes.ts and mcp-routes.ts

Impact:
- Linux/WSL: Fixes incorrect directory creation
- Windows: No behavior change, maintains correct functionality

Fixes project-level hook settings being saved to wrong location when
using Dashboard frontend on Linux/WSL systems.
2025-12-23 17:58:33 +08:00
catlog22
8eb42816f1 Merge pull request #40 from rhyme227/fix/cache-manager-esm-compatibility
fix(core): replace require() with ESM imports in cache-manager
2025-12-23 16:36:31 +08:00
rhyme
ebdf64c0b9 fix(core): replace require() with ESM imports in cache-manager
Remove CommonJS require() calls that caused \"require is not defined\"
errors when scanning .workflow directories in ESM context.

Changes:
- Add unlinkSync and readdirSync to fs import statement
- Replace require('fs').unlinkSync() with direct unlinkSync() call
- Replace require('fs').readdirSync() with direct readdirSync() call

Fixes: Cannot scan directory .workflow/active: require is not defined

File: ccw/src/core/cache-manager.ts
2025-12-23 15:33:29 +08:00
catlog22
caab5f476e Merge pull request #39 from rhyme227/fix/codexlens-model-cache-detection
fix(codexlens): correct fastembed 0.7.4 cache path and download trigger
2025-12-23 15:23:13 +08:00
rhyme
1998f3ae8a fix(codexlens): correct fastembed 0.7.4 cache path and download trigger
- Update cache path to ~/.cache/huggingface (HuggingFace Hub default)
- Fix model path format: models--{org}--{model}
- Add .embed() call to trigger actual download in download_model()
- Ensure cross-platform compatibility (Linux/Windows)
2025-12-23 14:51:08 +08:00
catlog22
5ff2a43b70 bump version to 6.2.9 2025-12-23 10:28:48 +08:00
catlog22
3cd842ca1a fix: ccw package.json removal - add root build script and fix cli.ts path resolution
- Fix cli.ts loadPackageInfo() to try root package.json first (../../package.json)
- Add build script and devDependencies to root package.json
- Remove ccw/package.json and ccw/package-lock.json (no longer needed)
- CodexLens: add config.json support for index_dir configuration

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 10:25:15 +08:00
catlog22
86cefa7bda bump version to 6.2.8 in package.json and package-lock.json 2025-12-23 09:49:55 +08:00
catlog22
fdac697f6e refactor: 移除 ccw/package.json 文件并更新路径引用 2025-12-23 09:47:07 +08:00
catlog22
8203d690cb fix: CodexLens model detection, hybrid search stability, and JSON logging
- Fix model installation detection using fastembed ONNX cache names
- Add embeddings_config table for model metadata tracking
- Fix hybrid search segfault by using single-threaded GPU mode
- Suppress INFO logs in JSON mode to prevent error display
- Add model dropdown filtering to show only installed models

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 21:49:10 +08:00
catlog22
cf58dc0dd3 bump version to 6.2.6 in package.json 2025-12-22 20:17:38 +08:00
catlog22
6a69af3bf1 feat: 更新嵌入批处理大小至 256,以优化性能并提高 GPU 加速效率 2025-12-22 17:55:05 +08:00
catlog22
acdfbb4644 feat: Enhance CodexLens with GPU support and semantic status improvements
- Added accelerator and providers fields to SemanticStatus interface.
- Updated checkSemanticStatus function to retrieve ONNX providers and accelerator type.
- Introduced detectGpuSupport function to identify available GPU modes (CUDA, DirectML).
- Modified installSemantic function to support GPU acceleration modes and clean up ONNX Runtime installations.
- Updated package requirements in PKG-INFO for semantic-gpu and semantic-directml extras.
- Added new source files for GPU support and enrichment functionalities.
- Updated tests to cover new features and ensure comprehensive testing.
2025-12-22 17:42:26 +08:00
catlog22
72f24bf535 feat: 更新版本号至 6.2.4,添加 GPU 加速支持和相关依赖 2025-12-22 14:15:36 +08:00
catlog22
ba23244876 feat: 更新版本号至 6.2.2,并添加 dist 目录到文件列表 2025-12-22 12:06:59 +08:00
catlog22
624f9f18b4 feat: 更新项目名称和版本号,提升版本管理清晰度 2025-12-22 10:29:32 +08:00
catlog22
17002345c9 feat: 更新钩子模板检查逻辑,支持基于唯一模式的命令匹配;在搜索元数据中添加回退模式字段 2025-12-22 10:25:53 +08:00
catlog22
f3f2051c45 feat: 优化项目和全局配置的获取逻辑,添加Codex配置支持 2025-12-22 10:16:58 +08:00
catlog22
e60d793c8c fix: 修复 SmartSearch 的 ripgrep limit 和 FTS 分词器问题
- Ripgrep 模式: 添加总结果数量限制,防止返回超过 2MB 数据
  - --max-count 只限制每个文件的匹配数,现在在收集结果时应用 limit
  - 达到限制时在 metadata 中添加 warning 提示

- FTS 分词器: 将点号(.)添加到 tokenchars,修复 PortRole.FLOW 等带点号标识符的精确搜索
  - 更新 dir_index.py 和 migration_004_dual_fts.py 中的 tokenize 配置
  - 需要重建索引才能生效

- Exact 模式: 添加 fuzzy 回退,当精确搜索无结果时自动尝试模糊搜索
  - 回退时在 metadata 中标注 fallback: 'fuzzy'

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:50:29 +08:00
catlog22
7ecc64614a feat: include codex-lens Python package in npm distribution
- Add codex-lens/src/codexlens/ to package.json files
- Add codex-lens/pyproject.toml for pip install
- Update .npmignore to exclude Python cache and dev files
- Enables ccw view CodexLens installation from npm package

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 08:41:55 +08:00
catlog22
0311237db2 chore: release v6.2.0 with 122 commits
- Updated CHANGELOG.md with comprehensive 6.2.0 release notes
- Bump version to 6.2.0 in package.json
- 62 new features, 17 bug fixes, 11 refactors, 6 performance optimizations

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:59:29 +08:00
catlog22
11d8187258 feat: 添加取消索引和检查索引状态的API,优化CodexLens的用户体验 2025-12-21 23:52:46 +08:00
catlog22
fc4a9af0cb feat: 引入流式生成器以优化内存使用,改进嵌入生成过程 2025-12-21 23:47:29 +08:00
catlog22
fa64e11a77 refactor: 优化嵌入生成过程,调整批处理大小和内存管理策略 2025-12-21 23:37:34 +08:00
catlog22
210f0f1012 feat: 添加钩子命令,简化 Claude Code 钩子操作接口,支持会话上下文加载和通知功能 2025-12-21 23:28:19 +08:00
catlog22
6d3f10d1d7 feat: 增加文件读取功能的行分页支持,优化智能搜索的多词查询匹配 2025-12-21 21:45:04 +08:00
catlog22
09483c9f07 feat: 添加智能代码清理命令,支持主线检测和过时工件发现 2025-12-21 21:10:55 +08:00
catlog22
2871950ab8 fix: 修复向量索引进度显示过早完成的问题
问题:FTS 索引完成后立即显示 100%,但嵌入生成仍在后台运行

修复:
- codex-lens.ts: 将 "Indexed X files" 阶段从 complete 改为 fts_complete (60%)
- codex-lens.ts: 添加嵌入批次和 Finalizing index 阶段解析
- embedding_manager.py: 使用 bulk_insert() 模式延迟 ANN 索引构建
- embedding_manager.py: 添加 "Finalizing index" 进度回调

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 20:55:45 +08:00
catlog22
5849f751bc fix: 修复嵌入生成内存泄漏,优化性能
- HNSW 索引:预分配从 100 万降至 5 万,添加动态扩容和可控保存
- Embedder:添加 embed_to_numpy() 避免 .tolist() 转换,增强缓存清理
- embedding_manager:每 10 批次重建 embedder 实例,显式 gc.collect()
- VectorStore:添加 bulk_insert() 上下文管理器,支持 numpy 批量写入
- Chunker:添加 skip_token_count 轻量模式,使用 char/4 估算(~9x 加速)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 19:15:47 +08:00
catlog22
45f92fe066 feat: 实现 MCP 工具集中式路径验证,增强安全性和可配置性
- 新增 path-validator.ts:参考 MCP filesystem 服务器设计的集中式路径验证器
  - 支持 CCW_PROJECT_ROOT 和 CCW_ALLOWED_DIRS 环境变量配置
  - 多层路径验证:绝对路径解析 → 沙箱检查 → 符号链接验证
  - 向后兼容:未设置环境变量时回退到 process.cwd()

- 更新所有 MCP 工具使用集中式路径验证:
  - write-file.ts: 使用 validatePath()
  - edit-file.ts: 使用 validatePath({ mustExist: true })
  - read-file.ts: 使用 validatePath() + getProjectRoot()
  - smart-search.ts: 使用 getProjectRoot()
  - core-memory.ts: 使用 getProjectRoot()

- MCP 服务器启动时输出项目根目录和允许目录信息

- MCP 管理界面增强:
  - CCW Tools 安装卡片新增路径设置 UI
  - 支持 CCW_PROJECT_ROOT 和 CCW_ALLOWED_DIRS 配置
  - 添加"使用当前项目"快捷按钮
  - 支持 Claude 和 Codex 两种模式
  - 添加中英文国际化翻译

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 18:14:06 +08:00
catlog22
f492f4839a refactor: 移除 CLI 中过宽的异常捕获
- 移除所有 16 个 except Exception 块
- 只保留对特定异常的捕获 (StorageError, ConfigError, SearchError 等)
- 允许未知异常自然传播,便于调试
- 保留嵌入功能的可选异常处理

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:19:54 +08:00
catlog22
fa81793bea refactor: 优化异常处理,使用 cached_property 替代 property,增强代码可读性;添加 RelationshipType 枚举以规范化关系类型 2025-12-21 17:01:49 +08:00
catlog22
c12ef3e772 feat: 优化 core_memory MCP 工具,支持跨项目导出和精简列表输出
- 新增 findMemoryAcrossProjects 函数,支持按 CMEM-xxx ID 跨所有项目搜索记忆
- export 操作增强:当前项目找不到时自动搜索所有项目数据库
- list 操作优化:返回精简格式,preview 截断为 100 字符,减少输出体积

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:39:45 +08:00
catlog22
6eebdb8898 fix: 修复额外的内存泄露问题
1. hybrid_search.py: 修复 _search_vector 方法中的 SQLite 连接泄露
   - 使用 with 语句包装数据库连接
   - 添加异常处理确保连接正确关闭

2. symbol_extractor.py: 添加上下文管理器支持
   - 实现 __enter__ 和 __exit__ 方法
   - 支持 with 语句自动管理资源

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:39:38 +08:00
catlog22
3e9a309079 refactor: 移除图索引功能,修复内存泄露,优化嵌入生成
主要更改:

1. 移除图索引功能 (graph indexing)
   - 删除 graph_analyzer.py 及相关迁移文件
   - 移除 CLI 的 graph 命令和 --enrich 标志
   - 清理 chain_search.py 中的图查询方法 (370行)
   - 删除相关测试文件

2. 修复嵌入生成内存问题
   - 重构 generate_embeddings.py 使用流式批处理
   - 改用 embedding_manager 的内存安全实现
   - 文件从 548 行精简到 259 行 (52.7% 减少)

3. 修复内存泄露
   - chain_search.py: quick_search 使用 with 语句管理 ChainSearchEngine
   - embedding_manager.py: 使用 with 语句管理 VectorStore
   - vector_store.py: 添加暴力搜索内存警告

4. 代码清理
   - 移除 Symbol 模型的 token_count 和 symbol_type 字段
   - 清理相关测试用例

测试: 760 passed, 7 skipped

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:22:03 +08:00
catlog22
15d5890861 feat: 更新 stopCommand 函数以确保进程正常退出;优化 MCP 路由序列化以支持嵌套对象;添加 CSS 类以实现文本行数限制 2025-12-21 12:47:25 +08:00
catlog22
89b3475508 feat: 更新 CodexLens 路由处理,保持总大小一致性并添加完整索引目录大小 2025-12-21 11:02:07 +08:00
catlog22
6e301538ed feat: 调整导航项字体大小,提升可读性和视觉一致性 2025-12-21 10:53:25 +08:00
catlog22
c3a31f2c5d feat: 优化 CLI 通知逻辑,确保进程在通知后能正常退出;增强侧边栏导航项的层级可视化 2025-12-21 10:37:29 +08:00
catlog22
559b1e02a7 feat: 增加 CLI 通知的超时设置,优化执行工具的会话跟踪逻辑 2025-12-21 10:02:36 +08:00
catlog22
9e4412c7a8 Add workflow execution prompts for task management
- Introduced `execute.md` for sequential task execution from session folder with detailed execution rules, task tracking, and error handling.
- Added `lite-execute.md` for lightweight task execution from a JSON plan file, emphasizing serial execution and dependency management.
2025-12-21 09:52:30 +08:00
catlog22
6dab38172f feat: 增强 CSS 布局,优化组件的灵活性和响应式设计;更新调试和轻量级计划工作流文档 2025-12-21 09:36:56 +08:00
catlog22
f1ee46e1ac feat: 优化文件管理器的加载体验,异步加载新鲜度数据并添加加载状态指示 2025-12-20 23:46:11 +08:00
catlog22
775928456d feat: 增强会话管理功能,添加会话状态跟踪和进程披露,优化钩子管理界面 2025-12-20 23:14:07 +08:00
catlog22
fd4a15c84e fix: improve chunking logic in Chunker class and enhance smart search tool with comprehensive features
- Updated the Chunker class to adjust the window movement logic, ensuring proper handling of overlap lines.
- Introduced a new smart search tool with features including intent classification, CodexLens integration, multi-backend search routing, and index status checking.
- Implemented various search modes (auto, hybrid, exact, ripgrep, priority) with detailed metadata and error handling.
- Added support for progress tracking during index initialization and enhanced output transformation based on user-defined modes.
- Included comprehensive documentation for usage and parameters in the smart search tool.
2025-12-20 21:44:15 +08:00
catlog22
be725ce21f chore: 删除不再使用的 reindex 和测试脚本 2025-12-20 17:34:26 +08:00
catlog22
fa31552cc1 fix: Use manifest-based cleanup for clean install
- Clean only files recorded in installation manifest
- Backup only manifest-recorded files instead of entire directories
- Skip cleanup when no manifest exists (first install or manual)
- Preserve user settings (settings.json, settings.local.json)
- Remove unused directory-based cleanup functions

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 17:12:53 +08:00
catlog22
a3ccf5baed fix: Refactor installation process for improved cleanup and backup handling 2025-12-20 16:52:15 +08:00
catlog22
8c6225b749 docs: Add dashboard operation guides
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 16:16:14 +08:00
catlog22
89e77c0089 docs: Update documentation and CLI command improvements
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 16:15:35 +08:00
catlog22
b27d8a9570 feat: Add CLAUDE.md freshness tracking and update reminders
- Add SQLite table and CRUD methods for tracking update history
- Create freshness calculation service based on git file changes
- Add API endpoints for freshness data, marking updates, and history
- Display freshness badges in file tree (green/yellow/red indicators)
- Show freshness gauge and details in metadata panel
- Auto-mark files as updated after CLI sync
- Add English and Chinese i18n translations

Freshness algorithm: 100 - min((changedFilesCount / 20) * 100, 100)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 16:14:46 +08:00
catlog22
4a3ff82200 fix: Align semantic status check with CodexLens checkSemanticStatus
- Use checkSemanticStatus() from codex-lens.ts instead of isEmbedderAvailable()
- Returns accurate detection of fastembed installation status
- Fix install guide link to navigate to CLI Manager and open CodexLens config
- Update i18n: "Install Guide" -> "Go to Settings" (EN/ZH)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:51:50 +08:00
catlog22
bfbab44756 docs: Improve MCP tool descriptions for clarity and completeness
- smart_search: Condense verbose description from 40 to 12 lines while preserving key usage examples
- write_file: Add missing createDirectories parameter documentation
- edit_file: Clarify update/line mode naming and add batch edit examples

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:46:24 +08:00
catlog22
4458af83d8 feat: Upgrade to version 6.2.0 with major enhancements
- Updated COMMAND_SPEC.md to reflect new version and features including native CodexLens and CLI refactor.
- Revised GETTING_STARTED.md and GETTING_STARTED_CN.md for improved onboarding experience with new features.
- Enhanced INSTALL_CN.md to highlight the new CodexLens and Dashboard capabilities.
- Updated README.md and README_CN.md to showcase version 6.2.0 features and breaking changes.
- Introduced memory embedder scripts with comprehensive documentation and quick reference.
- Added test suite for memory embedder functionality to ensure reliability and correctness.
- Implemented TypeScript integration examples for memory embedder usage.
2025-12-20 13:16:09 +08:00
catlog22
6b62b5b5a9 feat: Add embedding status hint in clustering UI
- Add embedding status check API endpoints (embed-status, embed)
- Display embedding hint in cluster list view:
  - Warning when vector model not installed
  - Progress indicator when embeddings pending
  - Generate button for quick embedding
- Add i18n translations (EN/ZH)
- Add CSS styles for embedding hint components

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:15:25 +08:00
catlog22
31cc060837 feat: Add vector embeddings for core memory semantic search
- Add memory_chunks table for storing chunked content with embeddings
- Create Python embedder script (memory_embedder.py) using CodexLens fastembed
- Add TypeScript bridge (memory-embedder-bridge.ts) for Python interop
- Implement content chunking with paragraph/sentence-aware splitting
- Add vectorSimilarity dimension to clustering (weight 0.3)
- New CLI commands: ccw memory embed, search, embed-status
- Extend core-memory MCP tool with embed/search/embed_status operations

Clustering improvement: max relevance 0.388 → 0.809 (+109%)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:09:43 +08:00
catlog22
ea284d739a feat: Add cluster management commands for deletion, merging, and deduplication 2025-12-20 12:23:08 +08:00
catlog22
ab06ed0083 feat: Enhance session clustering with new CLI options and adjust clustering threshold 2025-12-20 11:41:28 +08:00
catlog22
4de4db3c69 feat: Implement executor assignment and clustering optimizations for session management 2025-12-20 11:29:16 +08:00
catlog22
e1cac5dd50 Refactor search modes and optimize embedding generation
- Updated the dashboard template to hide the Code Graph Explorer feature.
- Enhanced the `executeCodexLens` function to use `exec` for better cross-platform compatibility and improved command execution.
- Changed the default `maxResults` and `limit` parameters in the smart search tool to 10 for better performance.
- Introduced a new `priority` search mode in the smart search tool, replacing the previous `parallel` mode, which now follows a fallback strategy: hybrid -> exact -> ripgrep.
- Optimized the embedding generation process in the embedding manager by batching operations and using a cached embedder instance to reduce model loading overhead.
- Implemented a thread-safe singleton pattern for the embedder to improve performance across multiple searches.
2025-12-20 11:08:34 +08:00
catlog22
7adde91e9f feat: Add search result grouping by similarity score
Add functionality to group search results with similar content and scores
into a single representative result with additional locations.

Changes:
- Add AdditionalLocation entity model for storing grouped result locations
- Add additional_locations field to SearchResult for backward compatibility
- Implement group_similar_results() function in ranking.py with:
  - Content-based grouping (by excerpt or content field)
  - Score-based sub-grouping with configurable threshold
  - Metadata preservation with grouped_count tracking
- Add group_results and grouping_threshold options to SearchOptions
- Integrate grouping into ChainSearchEngine.search() after RRF fusion

Test coverage:
- 36 multi-level tests covering unit, boundary, integration, and performance
- Real-world scenario tests for RRF scores and duplicate code detection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 16:33:44 +08:00
catlog22
3428642d04 feat: Optimize FTS search with batch symbol fetching and improved excerpt generation 2025-12-19 15:35:31 +08:00
catlog22
2f0cce0089 feat: Enhance CodexLens indexing and search capabilities with new CLI options and improved error handling 2025-12-19 15:10:37 +08:00
catlog22
c7ced2bfbb feat(ccw): Add count-based memory update strategy and fix MCP card click
- Add count-based update strategy for memory hooks (threshold-based triggering)
- Add threshold config field (default: 10, range: 3-50)
- Add i18n translations for count-based strategy (EN/ZH)
- Fix MCP card click not responding due to HTML entity encoding in JSON
- Add unescapeHtml() utility function for decoding HTML entities
- Move stopPropagation from container div to individual buttons
- Change CCW MCP install to use cmd /c npx -y format for Windows

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 11:41:21 +08:00
catlog22
69049e3f45 feat: Return complete method blocks in FTS search results
- Add helper methods to locate match lines and find containing symbols
- Modify search_fts, search_fts_exact, search_fts_fuzzy to return complete
  code blocks (functions/methods/classes) instead of short snippets
- Join with files table to get full content and file_id
- Query symbols table to find the smallest symbol containing the match
- Fall back to context lines when no symbol contains the match
- Add return_full_content and context_lines parameters for flexibility
- Include start_line, end_line, symbol_name, symbol_kind in SearchResult

This improves search result quality by returning semantically meaningful
code blocks rather than arbitrary 20-byte snippets.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 11:38:39 +08:00
catlog22
e17e9a6473 feat: Enhance memory compact output format for better session recovery
- Add Session ID and Project Root fields for workflow tracking
- Split Active Files into Working Files (modified) and Reference Files (read-only)
- Use absolute paths for all file references
- Support multiple plan sources: workflow/todo/user-stated/inferred
- Preserve complete execution plan verbatim without summarization
- Add path resolution rules and reference file categories
- Update quality checklist with new validation criteria

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 11:00:07 +08:00
catlog22
5e91ba6c60 Implement ANN index using HNSW algorithm and update related tests
- Added ANNIndex class for approximate nearest neighbor search using HNSW.
- Integrated ANN index with VectorStore for enhanced search capabilities.
- Updated test suite for ANN index, including tests for adding, searching, saving, and loading vectors.
- Modified existing tests to accommodate changes in search performance expectations.
- Improved error handling for file operations in tests to ensure compatibility with Windows file locks.
- Adjusted hybrid search performance assertions for increased stability in CI environments.
2025-12-19 10:35:29 +08:00
catlog22
9f6e6852da feat: Add core memory clustering visualization and hooks configuration
- Implemented core memory clustering visualization in core-memory-clusters.js
- Added functions for loading, rendering, and managing clusters and their members
- Created example hooks configuration in hooks-config-example.json for session management
- Developed test script for hooks integration in test-hooks.js
- Included error handling and notifications for user interactions
2025-12-18 23:06:58 +08:00
catlog22
68f9de0c69 refactor: Replace knowledge graph with session clustering system
Remove legacy knowledge graph and evolution tracking features,
introduce new session clustering model for Core Memory.

Changes:
- Remove knowledge_graph, knowledge_graph_edges, evolution_history tables
- Add session_clusters, cluster_members, cluster_relations tables
- Add session_metadata_cache for metadata caching
- Add new interfaces: SessionCluster, ClusterMember, ClusterRelation, SessionMetadataCache
- Add CRUD methods for cluster management
- Add session metadata upsert and search methods
- Remove extractKnowledgeGraph, getKnowledgeGraph, trackEvolution methods
- Remove API routes for /knowledge-graph, /evolution, /graph
- Add database migration to clean up old tables
- Update generateClusterId() for CLST-* ID format

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 19:21:52 +08:00
catlog22
17af615fe2 Add help view and core memory styles
- Introduced styles for the help view including tab transitions, accordion animations, search highlighting, and responsive design.
- Implemented core memory styles with modal base styles, memory card designs, and knowledge graph visualization.
- Enhanced dark mode support across various components.
- Added loading states and empty state designs for better user experience.
2025-12-18 18:29:45 +08:00
catlog22
4577be71ce feat: Add notification system for core memory view with animations 2025-12-18 15:28:14 +08:00
catlog22
0311d63b7d feat: Enhance graph exploration with file and module filtering options 2025-12-18 14:58:20 +08:00
catlog22
440314c16d feat: Enhance CLI resume functionality with usage guidance and multi-session merge
- Add resume usage timing guidance (multi-round planning, multi-model collaboration)
- Document multi-session merge capability with --resume <id1>,<id2> syntax
- Improve CLI prompt validation to allow resume without explicit prompt
- Streamline documentation by removing redundant examples and model details

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 14:35:01 +08:00
catlog22
8dd4a513c8 Refactor CLI command usage from ccw cli exec to ccw cli -p for improved prompt handling
- Updated command patterns across documentation and templates to reflect the new CLI syntax.
- Enhanced CLI tool implementation to support reading prompts from files and multi-line inputs.
- Modified core components and views to ensure compatibility with the new command structure.
- Adjusted help messages and internationalization strings to align with the updated command format.
- Improved error handling and user notifications in the CLI execution flow.
2025-12-18 14:12:45 +08:00
catlog22
e096fc98e2 feat: Implement core memory management with knowledge graph and evolution tracking
- Added core-memory.js and core-memory-graph.js for managing core memory views and visualizations.
- Introduced functions for viewing knowledge graphs and evolution history of memories.
- Implemented modal dialogs for creating, editing, and viewing memory details.
- Developed core-memory.ts for backend operations including list, import, export, and summary generation.
- Integrated Zod for parameter validation in core memory operations.
- Enhanced UI with dynamic rendering of memory cards and detailed views.
2025-12-18 10:07:29 +08:00
catlog22
4329bd8e80 fix: Add run_in_background=false to all agent Task invocations
Ensure all agent executions wait for results before proceeding.
Modified 20 workflow command files with 32 Task call updates.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 10:00:22 +08:00
catlog22
ae07df612d feat: Increase indexing timeout to 30 minutes for large codebases
- /api/codexlens/init: 5min → 30min
- smart-search init action: 5min → 30min
- executeInitWithProgress: 5min → 30min
- executeCodexLens default: 1min → 5min

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 09:48:55 +08:00
catlog22
d5d6f1fbbe feat: Replace modal with bottom floating progress bar for indexing
- Fixed bottom progress bar appears during CodexLens index init
- Shows spinner, status text, percentage, and progress bar
- Green success state with checkmark on completion
- Red error state with alert icon on failure
- Auto-dismisses after 3 seconds on success
- Added console logging for debugging WebSocket events
- Slide-down animation when closing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 09:33:19 +08:00
catlog22
b9d068d6d4 feat: Add real-time progress output for MCP init action
- MCP server outputs progress to stderr during smart_search init
- Progress format: [Progress] {percent}% - {message}
- Does not interfere with JSON-RPC protocol (stdout)
- Added executeInitWithProgress for external progress callback
- Added executeToolWithProgress to tools/index.ts

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:05:32 +08:00
catlog22
48ac43d628 fix: Add cleanup of obsolete files during ccw install reinstallation
- Add getFileReferenceCounts() to track file references across manifests
- Add cleanupOldFiles() to remove files not in new installation
- Protect shared files referenced by other installations (Global/Path)
- Display cleanup statistics in installation summary

Previously, reinstalling would only overwrite existing files but leave
obsolete files that were removed from source. Now properly cleans up
while protecting files shared between Global and Path installations.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:47:49 +08:00
catlog22
79da2c8c17 refactor: Remove redundant schema details, let planning agent read schema independently
- Remove detailed plan.json structure from prompt (agent reads schema file)
- Clarify execution steps: agent reads schema first, then explores and generates
- Remove ambiguous "Execute CLI planning using Gemini" step

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:36:41 +08:00
catlog22
6aac7bb8e3 refactor: Replace exact deduplication with intelligent intent-based merging in lite-plan
Simplify clarification question deduplication to use Claude's native intelligence
for identifying similar intents and merging questions across exploration angles.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:17:27 +08:00
catlog22
51a61bef31 Add parallel search mode and index progress bar
Features:
- CCW smart_search: Add 'parallel' mode that runs hybrid + exact + ripgrep
  simultaneously with RRF (Reciprocal Rank Fusion) for result merging
- Dashboard: Add real-time progress bar for CodexLens index initialization
- MCP: Return progress metadata in init action response
- Codex-lens: Auto-detect optimal worker count for parallel indexing

Changes:
- smart-search.ts: Add parallel mode, RRF fusion, progress tracking
- codex-lens.ts: Add onProgress callback support, progress parsing
- codexlens-routes.ts: Broadcast index progress via WebSocket
- codexlens-manager.js: New index progress modal with real-time updates
- notifications.js: Add WebSocket event handler registration system
- i18n.js: Add English/Chinese translations for progress UI
- index_tree.py: Workers parameter now auto-detects CPU count (max 16)
- commands.py: CLI --workers parameter supports auto-detection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:17:15 +08:00
catlog22
44d84116c3 Revert: Remove ccw session management while keeping ccw cli exec
Selectively revert ccw session management commands back to commit 5114a94,
while preserving ccw cli exec improvements.

Changes:
- Session management commands (start, list, resume, complete): Full revert to bash commands
- execute.md: Full revert (only had ccw session changes)
- review.md: Reverted ccw session read, kept ccw cli exec
- docs.md: Reverted ccw session read/write, kept ccw cli exec
- lite-fix.md: Reverted ccw session init/read, kept other changes
- lite-plan.md: Reverted ccw session init/read, kept other changes
- lite-execute.md: No changes (kept ccw cli exec intact)
- code-developer.md: No changes (kept ccw cli exec intact)

All ccw session management operations replaced with bash commands.
All ccw cli exec commands preserved for unified CLI execution.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 22:52:12 +08:00
catlog22
474a1ce027 fix: Correct Exa MCP tool call syntax in context-requirements
- Change exa() to mcp__exa__search() for correct MCP invocation
- Add complete parameter documentation (query, numResults, livecrawl)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 22:25:50 +08:00
catlog22
b22839c99f fix: Resolve MCP installation issues and enhance path resolution
- Fixed API endpoint mismatches in mcp-manager.js to ensure global install/update buttons function correctly.
- Corrected undefined function references in mcp-manager.js for project installation.
- Refactored event handling to eliminate global scope pollution in mcp-manager.js.
- Added comprehensive debugging guide for MCP installation issues.
- Implemented a session path resolver to infer content types from filenames and paths, improving usability.
- Introduced tests for embeddings improvements in init and status commands to verify functionality.
2025-12-17 22:05:16 +08:00
catlog22
8b927f302c Fix MCP Manager panel - 13 critical issues resolved
Issues fixed:
1. API endpoint mismatch (/api/mcp-add-global-server)
2. Undefined function reference (installMcpToProject → copyMcpServerToProject)
3. Inline onclick handler scope issues (converted to data-action)
4. querySelector only finding first element (use querySelectorAll)
5. Path normalization causing wrong MCP badge count
6. Lucide icons destroying event listeners (reordered execution)
7. Codex button JSON serialization syntax error
8. Codex API routes 404 (add /api/codex-mcp route matching)
9. False warning suppression for conditional buttons
10. HTML syntax error from JSON in onclick attributes
11. CSS z-index issue - ::before pseudo-element blocking clicks
12. Navigation badge path matching (try both slash formats)
13. Remove deprecated codex_lens tool (merged into smart_search)

Key changes:
- server.ts: Add /api/codex-mcp route matching
- 15-mcp-manager.css: Add pointer-events:none to ::before, z-index for buttons
- components/mcp-manager.js: Fix updateMcpBadge path matching, global exports
- views/mcp-manager.js: Convert onclick to data-action, add event listeners,
  update CCW_MCP_TOOLS list, fix JSON escaping in HTML attributes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 19:23:39 +08:00
catlog22
c16da759b2 Fix session management location inference and ccw command usage
This commit addresses multiple issues in session management and command documentation:

Session Management Fixes:
- Add auto-inference of location from type parameter in session.ts
- When --type lite-plan/lite-fix is specified, automatically set location accordingly
- Preserve explicit --location parameter when provided
- Update session-manager.ts to support type-based location inference
- Fix metadata filename selection (session-metadata.json vs workflow-session.json)

Command Documentation Fixes:
- Add missing --mode analysis parameter (3 locations):
  * commands/memory/docs.md
  * commands/workflow/lite-execute.md (2 instances)
- Add missing --mode write parameter (4 locations):
  * commands/workflow/tools/task-generate-agent.md
- Remove non-existent subcommands (3 locations):
  * commands/workflow/session/complete.md (manifest, project)
- Update session command syntax to use simplified format:
  * Changed from 'ccw session manifest read' to 'test -f' checks
  * Changed from 'ccw session project read' to 'test -f' checks

Documentation Updates:
- Update lite-plan.md and lite-fix.md to use --type parameter
- Update session/start.md to document lite-plan and lite-fix types
- Sync all fixes to skills/command-guide/reference directory (84 files)

All ccw command usage across the codebase is now consistent and correct.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:09:23 +08:00
catlog22
74a830694c Fix CodexLens embeddings generation to achieve 100% coverage
Previously, embeddings were only generated for root directory files (1.6% coverage, 5/303 files).
This fix implements recursive processing across all subdirectory indexes, achieving 100% coverage
with 2,042 semantic chunks across all 303 files in 26 index databases.

Key improvements:

1. **Recursive embeddings generation** (embedding_manager.py):
   - Add generate_embeddings_recursive() to process all _index.db files in directory tree
   - Add get_embeddings_status() for comprehensive coverage statistics
   - Add discover_all_index_dbs() helper for recursive file discovery

2. **Enhanced CLI commands** (commands.py):
   - embeddings-generate: Add --recursive flag for full project coverage
   - init: Use recursive generation by default for complete indexing
   - status: Display embeddings coverage statistics with 50% threshold

3. **Smart search routing improvements** (smart-search.ts):
   - Add 50% embeddings coverage threshold for hybrid mode routing
   - Auto-fallback to exact mode when coverage insufficient
   - Strip ANSI color codes from JSON output for correct parsing
   - Add embeddings_coverage_percent to IndexStatus and SearchMetadata
   - Provide clear warnings with actionable suggestions

4. **Documentation and analysis**:
   - Add SMART_SEARCH_ANALYSIS.md with initial investigation
   - Add SMART_SEARCH_CORRECTED_ANALYSIS.md revealing true extent of issue
   - Add EMBEDDINGS_FIX_SUMMARY.md with complete fix summary
   - Add check_embeddings.py script for coverage verification

Results:
- Coverage improved from 1.6% (5/303 files) to 100% (303/303 files) - 62.5x increase
- Semantic chunks increased from 10 to 2,042 - 204x increase
- All 26 subdirectory indexes now have embeddings vs just 1

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-17 17:54:33 +08:00
catlog22
d06a3ca12e Add comprehensive workflows for CLI tools usage, coding philosophy, context requirements, file modification, and CodexLens auto hybrid mode
- Introduced a detailed guide for intelligent tools selection strategy, including quick reference, tool specifications, prompt templates, and best practices for CLI execution.
- Established a coding philosophy document outlining core beliefs, simplicity principles, and guidelines for effective coding practices.
- Created context requirements documentation emphasizing the importance of understanding existing patterns and dependencies before implementation.
- Developed a file modification workflow detailing the use of edit_file and write_file MCP tools, along with priority logic for file reading and editing.
- Implemented CodexLens auto hybrid mode, enhancing the CLI with automatic vector embedding generation and default hybrid search mode based on embedding availability.
2025-12-17 09:53:30 +08:00
catlog22
154a9283b5 Add internationalization support for help view and implement help rendering logic
- Introduced `help-i18n.js` for managing translations in Chinese and English for the help view.
- Created `help.js` to render the help view, including command categories, workflow diagrams, and CodexLens quick-start.
- Implemented search functionality with debounce for command filtering.
- Added workflow diagram rendering with Cytoscape.js integration.
- Developed tests for write-file verification, ensuring proper handling of small and large JSON files.
2025-12-16 22:24:29 +08:00
catlog22
b702791c2c Remove LLM enhancement features and related components as per user request. This includes the deletion of source code files, CLI commands, front-end components, tests, scripts, and documentation associated with LLM functionality. Simplified dependencies and reduced complexity while retaining core vector search capabilities. Validation of changes confirmed successful removal and functionality. 2025-12-16 21:38:27 +08:00
catlog22
d21066c282 Add scripts for inspecting LLM summaries and testing misleading comments
- Implement `inspect_llm_summaries.py` to display LLM-generated summaries from the semantic_chunks table in the database.
- Create `show_llm_analysis.py` to demonstrate LLM analysis of misleading code examples, highlighting discrepancies between comments and actual functionality.
- Develop `test_misleading_comments.py` to compare pure vector search with LLM-enhanced search, focusing on the impact of misleading or missing comments on search results.
- Introduce `test_llm_enhanced_search.py` to provide a test suite for evaluating the effectiveness of LLM-enhanced vector search against pure vector search.
- Ensure all new scripts are integrated with the existing codebase and follow the established coding standards.
2025-12-16 20:29:28 +08:00
catlog22
df23975a0b Add comprehensive tests for schema cleanup migration and search comparison
- Implement tests for migration 005 to verify removal of deprecated fields in the database schema.
- Ensure that new databases are created with a clean schema.
- Validate that keywords are correctly extracted from the normalized file_keywords table.
- Test symbol insertion without deprecated fields and subdir operations without direct_files.
- Create a detailed search comparison test to evaluate vector search vs hybrid search performance.
- Add a script for reindexing projects to extract code relationships and verify GraphAnalyzer functionality.
- Include a test script to check TreeSitter parser availability and relationship extraction from sample files.
2025-12-16 19:27:05 +08:00
catlog22
3da0ef2adb Add comprehensive tests for query parsing and Reciprocal Rank Fusion
- Implemented tests for the QueryParser class, covering various identifier splitting methods (CamelCase, snake_case, kebab-case), OR expansion, and FTS5 operator preservation.
- Added parameterized tests to validate expected token outputs for different query formats.
- Created edge case tests to ensure robustness against unusual input scenarios.
- Developed tests for the Reciprocal Rank Fusion (RRF) algorithm, including score computation, weight handling, and result ranking across multiple sources.
- Included tests for normalization of BM25 scores and tagging search results with source metadata.
2025-12-16 10:20:19 +08:00
catlog22
35485bbbb1 feat: Enhance navigation and cleanup for graph explorer view
- Added a cleanup function to reset the state when navigating away from the graph explorer.
- Updated navigation logic to call the cleanup function before switching views.
- Improved internationalization by adding new translations for graph-related terms.
- Adjusted icon sizes for better UI consistency in the graph explorer.
- Implemented impact analysis button functionality in the graph explorer.
- Refactored CLI tool configuration to use updated model names.
- Enhanced CLI executor to handle prompts correctly for codex commands.
- Introduced code relationship storage for better visualization in the index tree.
- Added support for parsing Markdown and plain text files in the symbol parser.
- Updated tests to reflect changes in language detection logic.
2025-12-15 23:11:01 +08:00
catlog22
894b93e08d feat(graph-explorer): implement interactive code relationship visualization with Cytoscape.js
- Added main render function to initialize the graph explorer view.
- Implemented data loading functions for graph nodes, edges, and search process data.
- Created UI layout with tabs for graph view and search process view.
- Developed filtering options for nodes and edges with corresponding UI elements.
- Integrated Cytoscape.js for graph visualization, including node and edge styling.
- Added functionality for node selection and details display.
- Implemented impact analysis feature with modal display for results.
- Included utility functions for refreshing data and managing UI states.
2025-12-15 19:35:18 +08:00
catlog22
97640a517a feat(storage): implement storage manager for centralized management and cleanup
- Added a new Storage Manager component to handle storage statistics, project cleanup, and configuration for CCW centralized storage.
- Introduced functions to calculate directory sizes, get project storage stats, and clean specific or all storage.
- Enhanced SQLiteStore with a public API for executing queries securely.
- Updated tests to utilize the new execute_query method and validate storage management functionalities.
- Improved performance by implementing connection pooling with idle timeout management in SQLiteStore.
- Added new fields (token_count, symbol_type) to the symbols table and adjusted related insertions.
- Enhanced error handling and logging for storage operations.
2025-12-15 17:39:38 +08:00
catlog22
ee0886fc48 feat: 更新工作流执行文档,增强任务跟踪和状态映射规则 2025-12-15 15:16:16 +08:00
catlog22
0fe16963cd Add comprehensive tests for tokenizer, performance benchmarks, and TreeSitter parser functionality
- Implemented unit tests for the Tokenizer class, covering various text inputs, edge cases, and fallback mechanisms.
- Created performance benchmarks comparing tiktoken and pure Python implementations for token counting.
- Developed extensive tests for TreeSitterSymbolParser across Python, JavaScript, and TypeScript, ensuring accurate symbol extraction and parsing.
- Added configuration documentation for MCP integration and custom prompts, enhancing usability and flexibility.
- Introduced a refactor script for GraphAnalyzer to streamline future improvements.
2025-12-15 14:36:09 +08:00
catlog22
82dcafff00 feat: 添加工作流执行文档,支持从会话文件夹顺序执行任务 2025-12-15 14:32:08 +08:00
catlog22
3ffb907a6f feat: add semantic graph design for static code analysis
- Introduced a comprehensive design document for a Code Semantic Graph aimed at enhancing static analysis capabilities.
- Defined the architecture, core components, and implementation steps for analyzing function calls, data flow, and dependencies.
- Included detailed specifications for nodes and edges in the graph, along with database schema for storage.
- Outlined phases for implementation, technical challenges, success metrics, and application scenarios.
2025-12-15 09:47:18 +08:00
catlog22
d91477ad80 feat: Implement CLAUDE.md Manager View with file tree, viewer, and metadata actions
- Added main JavaScript functionality for CLAUDE.md management including file loading, rendering, and editing capabilities.
- Created a test HTML file to validate the functionality of the CLAUDE.md manager.
- Introduced CLI generation examples and documentation for rules creation via CLI.
- Enhanced error handling and notifications for file operations.
2025-12-14 23:08:36 +08:00
catlog22
0529b57694 Implement database migration framework and performance optimizations
- Added active memory configuration for manual interval and Gemini tool.
- Created file modification rules for handling edits and writes.
- Implemented migration manager for managing database schema migrations.
- Added migration 001 to normalize keywords into separate tables.
- Developed tests for validating performance optimizations including keyword normalization, path lookup, and symbol search.
- Created validation script to manually verify optimization implementations.
2025-12-14 18:08:32 +08:00
catlog22
79a2953862 Add comprehensive tests for vector/semantic search functionality
- Implement full coverage tests for Embedder model loading and embedding generation
- Add CRUD operations and caching tests for VectorStore
- Include cosine similarity computation tests
- Validate semantic search accuracy and relevance through various queries
- Establish performance benchmarks for embedding and search operations
- Ensure edge cases and error handling are covered
- Test thread safety and concurrent access scenarios
- Verify availability of semantic search dependencies
2025-12-14 17:17:09 +08:00
catlog22
8d542b8e45 fix(ccw): prevent settings.json fields from being overwritten by hook operations
readSettingsFile() in hooks-routes and mcp-routes was returning { hooks: {} }
as default value when file not found or parse failed, causing writeFileSync()
to overwrite other fields (mcpServers, projects, statusLine) in settings.json.

Changed default return to {} to preserve all existing fields when updating hooks.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 16:17:40 +08:00
catlog22
ac9060ab3a fix(codex-lens): refine CLI exception handling with specific error types
Replace overly broad `except Exception` blocks with specific exception
handlers (StorageError, ConfigError, ParseError, SearchError, PermissionError)
across all CLI commands. This provides more precise error messages and
improves debugging experience for end users.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 16:10:59 +08:00
catlog22
1c9716e460 fix(ccw): only cache positive tool availability results
Fixes CLI tool detection failure after server restart.

The previous caching implementation cached negative results (errors,
timeouts) which caused persistent failures if the first check failed
for any transient reason (environment, timing, etc.).

Changes:
- Only cache positive tool availability results
- Don't cache errors or timeouts - they may be transient
- Subsequent checks will retry if a tool wasn't found

This ensures that once a tool is found, lookups are fast, but
transient failures don't persist in the cache.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 12:16:48 +08:00
catlog22
7e70e4c299 perf(ccw): optimize I/O operations and add caching layer
Performance Optimizations:

1. Async I/O Operations (data-aggregator.ts, session-scanner.ts):
   - Replace sync fs operations with fs/promises
   - Parallelize file reads with Promise.all()
   - Add concurrency limiting to prevent overwhelming system
   - Non-blocking event loop during aggregation

2. Data Caching Layer (cache-manager.ts):
   - New CacheManager<T> class for dashboard data caching
   - File timestamp tracking for change detection
   - TTL-based expiration (5 minutes default)
   - Automatic invalidation when files change
   - Cache location: .workflow/.ccw-cache/

3. CLI Executor Optimization (cli-executor.ts):
   - Tool availability caching with 5-minute TTL
   - Avoid repeated process spawning for where/which checks
   - Memory cache for frequently checked tools

Expected Performance Improvements:
- Data aggregation: 10x-50x faster with async I/O
- Cache hits: <5ms vs 200-500ms (40-100x improvement)
- CLI tool checks: <1ms cached vs 200-500ms

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 12:11:29 +08:00
catlog22
ac43cf85ec feat: Implement Skills Manager View and Notifier Module
- Added `skills-manager.js` for managing Claude Code skills with functionalities for loading, displaying, and editing skills.
- Introduced a Notifier module in `notifier.ts` for CLI to server communication, enabling notifications for UI updates on data changes.
- Created comprehensive documentation for the Chain Search implementation, including usage examples and performance tips.
- Developed a test suite for the Chain Search engine, covering basic search, quick search, symbol search, and files-only search functionalities.
2025-12-14 11:12:48 +08:00
catlog22
08dc0a0348 perf(codex-lens): optimize search performance with vectorized operations
Performance Optimizations:
- VectorStore: NumPy vectorized cosine similarity (100x+ faster)
  - Cached embedding matrix with pre-computed norms
  - Lazy content loading for top-k results only
  - Thread-safe cache invalidation
- SQLite: Added PRAGMA mmap_size=30GB for memory-mapped I/O
- FTS5: unicode61 tokenizer with tokenchars='_' for code identifiers
- ChainSearch: files_only fast path skipping snippet generation
- ThreadPoolExecutor: shared pool across searches

New Components:
- DirIndexStore: single-directory index with FTS5 and symbols
- RegistryStore: global project registry with path mappings
- PathMapper: source-to-index path conversion utility
- IndexTreeBuilder: hierarchical index tree construction
- ChainSearchEngine: parallel recursive directory search

Test Coverage:
- 36 comprehensive search functionality tests
- 14 performance benchmark tests
- 296 total tests passing (100% pass rate)

Benchmark Results:
- FTS5 search: 0.23-0.26ms avg (3900-4300 ops/sec)
- Vector search: 1.05-1.54ms avg (650-955 ops/sec)
- Full semantic: 4.56-6.38ms avg per query

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 11:06:24 +08:00
catlog22
90adef6cfb docs: clarify CodexLens action parameter requirements
Add clearer documentation for each action:
- search/search_files: requires query parameter
- symbol: no query, extracts all symbols from file

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:31:22 +08:00
catlog22
d4499cc6d7 refactor: replace Code Index MCP with native CCW CodexLens
Migrate all Code Index MCP references to CCW's built-in CodexLens tool:
- Update context-search-agent with codex_lens API calls
- Update test-context-search-agent with new search patterns
- Update memory/load command file discovery reference
- Update context-gather and task-generate-tdd MCP capabilities
- Update INSTALL docs to reflect CodexLens as built-in feature
- Sync all mirrored files in skills/command-guide/reference/

Old API (mcp__code-index__*) → New API (mcp__ccw-tools__codex_lens)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:26:12 +08:00
catlog22
958cf290e2 feat: add insights history feature with UI and backend support
- Implemented insights history section in the dashboard with cards displaying analysis results.
- Added CSS styles for insights cards, detail panel, and empty state.
- Enhanced i18n support for insights-related strings in English and Chinese.
- Developed backend methods for saving, retrieving, and deleting insights in the CLI history store.
- Integrated insights loading and rendering logic in the memory view.
- Added functionality to refresh insights and handle detail view interactions.
2025-12-14 09:48:02 +08:00
catlog22
d3a522f3e8 feat: add support for Claude CLI tool and enhance memory features
- Added new CLI tool "Claude" with command handling in cli-executor.ts.
- Implemented session discovery for Claude in native-session-discovery.ts.
- Enhanced memory view with active memory controls, including sync functionality and configuration options.
- Introduced zoom and fit view controls for memory graph visualization.
- Updated i18n.js for new memory-related translations.
- Improved error handling and migration for CLI history store.
2025-12-13 22:44:42 +08:00
catlog22
52935d4b8e feat: Implement resume strategy engine and session content parser
- Added `resume-strategy.ts` to determine optimal resume approaches including native, prompt concatenation, and hybrid modes.
- Introduced `determineResumeStrategy` function to evaluate various resume scenarios.
- Created utility functions for building context prefixes and formatting outputs in plain, YAML, and JSON formats.
- Added `session-content-parser.ts` to parse native CLI tool session files supporting Gemini/Qwen JSON and Codex JSONL formats.
- Implemented parsing logic for different session formats, including error handling for invalid lines.
- Provided functions to format conversations and extract user-assistant pairs from parsed sessions.
2025-12-13 20:29:19 +08:00
catlog22
32217f87fd feat(dashboard): CLI settings UI and Smart Context support
- Add CLI Settings section with Prompt Format selector
- Add Smart Context toggle and Max Files dropdown
- Update smart-search with output_mode (full/files_only/count)
- Add smart-context module for keyword extraction
- Improve Status page styling (remove card wrappers)
- Add i18n translations for new settings

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 17:28:39 +08:00
catlog22
675aff26ff feat(mcp): add read_file tool and simplify edit/write returns
- edit_file: truncate diff to 15 lines, compact result format
- write_file: return only path/bytes/message
- read_file: new tool with multi-file, directory, regex support
  - paths: single file, array, or directory
  - pattern: glob filter (*.ts)
  - contentPattern: regex content search
  - maxDepth, maxFiles, includeContent options
- Update tool-strategy.md documentation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 17:28:03 +08:00
catlog22
029384c427 feat: Implement SQLite storage for CLI execution history
- Introduced a new SQLite-based storage backend for managing CLI execution history.
- Added `CliHistoryStore` class to handle conversation records and turns with efficient queries.
- Migrated existing JSON history files to the new SQLite format.
- Updated CLI executor to use asynchronous and synchronous methods for saving and loading conversations.
- Enhanced execution history retrieval with support for filtering by tool, status, and search terms.
- Added prompt concatenation utilities to build multi-turn prompts in various formats (plain, YAML, JSON).
- Implemented batch deletion of conversations and improved error handling for database operations.
2025-12-13 14:53:53 +08:00
catlog22
37417caca2 feat(docs): clarify template requirements and fallback options in CLI execution guidelines 2025-12-13 14:29:23 +08:00
catlog22
8f58e4e48a feat(cli): update command patterns to use CCW CLI for analysis tasks 2025-12-13 14:24:37 +08:00
catlog22
68c872ad36 refactor(agents): make cli-lite-planning-agent generic for both workflows
- Update cli-lite-planning-agent to serve both lite-plan and lite-fix
- Add schema-driven output (plan-json-schema or fix-plan-json-schema)
- Support both explorations (lite-plan) and diagnoses (lite-fix) context
- Remove CLI execution ID planning from lite-plan.md and lite-fix.md
- Delegate CLI execution ID assignment to agent when user selects CLI execution

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 14:15:47 +08:00
catlog22
c780544792 feat(cli): add support for custom execution IDs and multi-turn conversations
- Introduced `--id <id>` option in CLI for custom execution IDs.
- Enhanced CLI command handling to support multi-turn conversations.
- Updated execution and conversation detail retrieval to accommodate new structure.
- Implemented merging of multiple conversations with tracking of source IDs.
- Improved history management to save and load conversation records.
- Added styles for displaying multi-turn conversation details in the dashboard.
- Refactored existing execution detail functions for backward compatibility.
2025-12-13 14:03:24 +08:00
catlog22
23e15e479e fix(cli-executor): update stdin prompt variable for CLI tool execution 2025-12-13 12:15:07 +08:00
catlog22
684618e72b feat: integrate session resume functionality into CLI commands and documentation 2025-12-13 12:09:32 +08:00
catlog22
93d3df1e08 feat: add task queue sidebar and resume functionality for CLI sessions
- Implemented task queue sidebar for managing active tasks with filtering options.
- Added functionality to close notification sidebar when opening task queue.
- Enhanced CLI history view to support resuming previous sessions with optional prompts.
- Updated CLI executor to handle resuming sessions for Codex, Gemini, and Qwen tools.
- Introduced utility functions for finding CLI history directories recursively.
- Improved task queue data management and rendering logic.
2025-12-13 11:51:53 +08:00
catlog22
335f5e9ec6 fix(ccw): correct template paths for TypeScript build
Fix paths from dist/core/ to src/templates/ since templates are not
compiled and remain in src directory.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 10:45:59 +08:00
catlog22
30e9ae0153 Refactor workflow session commands to utilize ccw CLI for session management
- Updated session completion process to use `ccw session` commands for listing, reading, and updating session statuses.
- Enhanced session listing command to provide metadata and statistics using `ccw session list` and `ccw session stats`.
- Streamlined session resume functionality with `ccw session` commands for checking status and updating session state.
- Improved session creation process by replacing manual directory and metadata handling with `ccw session init`.
- Introduced `session_manager` tool for simplified session operations, including listing, updating, and archiving sessions.
- Updated conflict resolution tools to generate structured output in `conflict-resolution.json` instead of markdown files.
- Enhanced TDD and UI design tools to utilize `ccw cli exec` for executing analysis commands, improving integration with the workflow.
2025-12-13 10:45:03 +08:00
catlog22
25ac862f46 feat(ccw): migrate backend to TypeScript
- Convert 40 JS files to TypeScript (CLI, tools, core, MCP server)
- Add Zod for runtime parameter validation
- Add type definitions in src/types/
- Keep src/templates/ as JavaScript (dashboard frontend)
- Update bin entries to use dist/
- Add tsconfig.json with strict mode
- Add backward-compatible exports for tests
- All 39 tests passing

Breaking changes: None (backward compatible)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 10:43:15 +08:00
catlog22
d4e59770d0 feat: Add CCW MCP server and tools integration
- Introduced `ccw-mcp` command for running CCW tools as an MCP server.
- Updated `package.json` to include new MCP dependencies and scripts.
- Enhanced CLI with new options for `codex_lens` tool.
- Implemented MCP server logic to expose CCW tools via Model Context Protocol.
- Added new tools and updated existing ones for better functionality and documentation.
- Created quick start and full documentation for MCP server usage.
- Added tests for MCP server functionality to ensure reliability.
2025-12-13 09:14:57 +08:00
catlog22
15122b9ebb fix(mcp): support same-name MCP servers with different configs
- Add getMcpConfigHash() to generate unique config fingerprints
- Modify getAllAvailableMcpServers() to differentiate same-name servers
  with different configurations using name@project-folder suffix
- Update renderAvailableServerCard() to show source project info and
  use originalName for correct installation
- Fix event handlers to use btn.dataset for event bubbling safety
- Add CCW Tools MCP installation with npx for cross-platform compatibility

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:20:34 +08:00
catlog22
a41e6d19fd Refactor code structure for improved readability and maintainability 2025-12-12 22:02:23 +08:00
catlog22
e879ec7189 feat(dashboard): optimize CCW Endpoint Tools display with card grid and detail modal 2025-12-12 20:01:55 +08:00
catlog22
4faa5f1c95 Add comprehensive tests for semantic chunking and search functionality
- Implemented tests for the ChunkConfig and Chunker classes, covering default and custom configurations.
- Added tests for symbol-based chunking, including single and multiple symbols, handling of empty symbols, and preservation of line numbers.
- Developed tests for sliding window chunking, ensuring correct chunking behavior with various content sizes and configurations.
- Created integration tests for semantic search, validating embedding generation, vector storage, and search accuracy across a complex codebase.
- Included performance tests for embedding generation and search operations.
- Established tests for chunking strategies, comparing symbol-based and sliding window approaches.
- Enhanced test coverage for edge cases, including handling of unicode characters and out-of-bounds symbol ranges.
2025-12-12 19:55:35 +08:00
catlog22
c42f91a7fe feat: Add support for Tree-Sitter parsing and enhance SQLite storage performance 2025-12-12 18:40:24 +08:00
catlog22
92d2085b64 Optimize SQLite FTS storage and pooling 2025-12-12 17:40:03 +08:00
catlog22
6a39f7e69d Refactor code structure for improved readability and maintainability 2025-12-12 16:27:37 +08:00
catlog22
dfa8dbc52a feat: Enhance CLI tools and history management
- Added CLI Manager and CLI History views to the navigation.
- Implemented rendering for CLI tools with detailed status and actions.
- Introduced a new CLI History view to display execution history with search and filter capabilities.
- Added hooks for managing and displaying available SKILLs in the Hook Manager.
- Created modals for Hook Wizards and Template View for better user interaction.
- Implemented semantic search dependency checks and installation functions in CodexLens.
- Updated dashboard layout to accommodate new features and improve user experience.
2025-12-12 16:26:49 +08:00
catlog22
a393601ec5 feat(codexlens): add CodexLens code indexing platform with incremental updates
- Add CodexLens Python package with SQLite FTS5 search and tree-sitter parsing
- Implement workspace-local index storage (.codexlens/ directory)
- Add incremental update CLI command for efficient file-level index refresh
- Integrate CodexLens with CCW tools (codex_lens action: update)
- Add CodexLens Auto-Sync hook template for automatic index updates on file changes
- Add CodexLens status card in CCW Dashboard CLI Manager with install/init buttons
- Add server APIs: /api/codexlens/status, /api/codexlens/bootstrap, /api/codexlens/init

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:02:32 +08:00
catlog22
b74a90b416 Refactor code structure for improved readability and maintainability 2025-12-12 11:19:58 +08:00
catlog22
77de8d857b feat: 添加冲突解决模式的JSON架构,支持冲突检测与解决 2025-12-12 09:21:05 +08:00
catlog22
76c1745269 refactor(task-generate-agent): optimize N+1 parallel planning prompts
- Phase 2B: Add structured agent prompt with TASK OBJECTIVE, MODULE SCOPE,
  SESSION PATHS, CONTEXT METADATA, CROSS-MODULE DEPENDENCIES sections
- Phase 3: Convert from function calls to agent invocation with complete
  prompt structure for IMPL_PLAN.md and TODO_LIST.md generation
- Align prompt structure with Phase 2A (Single Agent) for consistency
- Reference agent specification for template details instead of inline docs
- Add dependency resolution algorithm for CROSS:: placeholder resolution

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:49:40 +08:00
catlog22
811382775d feat: Implement fuzzy search functionality in smart-search.js
- Added buildFuzzyRegex function for approximate matching.
- Enhanced buildRipgrepCommand to support fuzzy parameter.
- Updated executeAutoMode to handle fuzzy search case.
- Implemented executeFuzzyMode for executing fuzzy search using ripgrep.
- Refactored import and export parsing functions for better modularity.
- Improved dependency graph building and circular dependency detection.
- Added caching mechanism for dependency graph to optimize performance.
2025-12-11 23:28:35 +08:00
catlog22
e8f1caa219 feat: Enhance CLI components with icons and improve file editing capabilities
- Added icons to the CLI History and CLI Tools headers for better UI representation.
- Updated CLI Status component to include tool-specific classes for styling.
- Refactored CCW Install Panel to improve layout and functionality, including upgrade and uninstall buttons.
- Enhanced the edit-file tool with new features:
  - Support for creating parent directories when writing files.
  - Added dryRun mode for previewing changes without modifying files.
  - Implemented a unified diff output for changes made.
  - Enabled multi-edit support in update mode.
- Introduced a new Smart Search Tool with multiple search modes (auto, exact, fuzzy, semantic, graph) and intent classification.
- Created a Write File Tool to handle file creation and overwriting with backup options.
2025-12-11 23:06:47 +08:00
catlog22
15c5cd5f6e refactor(notifications): 优化JSON格式化函数,增强可读性和错误处理 2025-12-11 21:33:37 +08:00
catlog22
766a8d2145 feat: Enhance global notifications with localStorage persistence and clear functionality
feat: Implement generic modal functions for better UI consistency

feat: Update navigation titles for CLI Tools view

feat: Add JSON formatting for notification details in CLI execution

feat: Introduce localStorage handling for global notification queue

feat: Expand CLI Manager view to include CCW installations with carousel

feat: Add CCW installation management with modal for user interaction

fix: Improve event delegation for explorer tree item interactions

refactor: Clean up CLI Tools section in dashboard HTML

feat: Add functionality to delete CLI execution history by ID
2025-12-11 21:18:28 +08:00
catlog22
e350e0c7bb Enhance logging and error handling in dashboard scripts
- Added detailed console logs in api.js to trace the execution flow during data loading and UI updates.
- Improved logging in main.js to monitor the initialization process and server mode data loading.
- Updated explorer.js to clarify the definition of defaultCliTool, indicating its location in another module.
2025-12-11 19:21:28 +08:00
catlog22
db4ab85d3e Refactor code structure for improved readability and maintainability 2025-12-11 19:02:07 +08:00
catlog22
cfcd277a58 refactor(session): 移除旧的操作参考,简化文档内容 2025-12-11 16:07:57 +08:00
catlog22
c256fd9379 refactor(session): migrate remaining bash commands to ccw session
Replace legacy bash operations in session commands with ccw session
commands for consistency and better maintainability.

Changes:
- session/list.md: Replace ls/wc with ccw session list
- session/complete.md: Replace bash marker/manifest ops with ccw session
- skills/command-guide reference docs: Mirror all changes

Commands replaced:
- `ls .workflow/active/WFS-*` → `ccw session list --location active`
- `test -f .archiving` → `ccw session read --type process --filename .archiving`
- `touch .archiving` → `ccw session write --type process --filename .archiving`
- `cat manifest.json` → `ccw session read manifest --type manifest`

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 15:08:55 +08:00
catlog22
0a4c205105 refactor(commands/agents): replace bash/jq with ccw session commands
Replace legacy bash/jq operations with ccw session commands for better
consistency and maintainability across workflow commands and agents.

Changes:
- commands/memory/docs.md: Use ccw session update/read for session ops
- commands/workflow/review.md: Replace cat/jq with ccw session read
- commands/workflow/tdd-verify.md: Replace find/jq with ccw session read
- agents/conceptual-planning-agent.md: Use ccw session read for metadata
- agents/test-fix-agent.md: Use ccw session read for context package
- skills/command-guide/reference/*: Mirror changes to skill docs
- ccw/src/commands/session.js: Fix EPIPE error when piping to jq/head

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 14:48:02 +08:00
catlog22
e815c3c10e fix(session-manager): support archived parameter in getSessionBase
The archive operation was failing to move sessions from active to
archives directory because getSessionBase() ignored the second
parameter. Now correctly returns archive path when archived=true.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 14:03:14 +08:00
catlog22
8eb1a4e52e feat(uninstall): 增强卸载命令以支持全局安装保护和文件跳过逻辑 2025-12-11 11:16:18 +08:00
catlog22
19648721fc feat: 重构安装和升级命令以支持全局子目录的安装和排除 2025-12-11 11:06:15 +08:00
catlog22
b81d1039c5 feat(cli): Add CLI Manager with status and history components
- Implemented CLI History Component to display execution history with filtering and search capabilities.
- Created CLI Status Component to show availability of CLI tools and allow setting a default tool.
- Enhanced notifications to handle CLI execution events.
- Integrated CLI Manager view to combine status and history panels for better user experience.
- Developed CLI Executor Tool for unified execution of external CLI tools (Gemini, Qwen, Codex) with streaming output.
- Added functionality to save and retrieve CLI execution history.
- Updated dashboard HTML to include navigation for CLI tools management.
2025-12-11 11:05:57 +08:00
catlog22
a667b7548c refactor(commands): replace bash/jq operations with ccw session commands
- session/start.md: Replace find/mkdir/echo with ccw session list/init
- session/list.md: Replace find/jq with ccw session list/stats/read
- session/resume.md: Replace jq status updates with ccw session status
- session/complete.md: Replace jq/mv with ccw session archive
- execute.md: Replace session discovery with ccw session list/status
- code-developer.md: Replace jq context-package read with ccw session read

Benefits:
- Atomic operations (no temp files)
- Auto workspace detection (works from subdirectories)
- Auto session location detection (active/archived/lite)
- Status history auto-tracking for tasks
- Consistent error handling

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 23:31:51 +08:00
catlog22
598bea9b21 feat(ccw): add session manager tool with auto workspace detection
- Add session_manager tool for workflow session lifecycle management
- Add ccw session CLI command with subcommands:
  - list, init, status, task, stats, delete, read, write, update, archive, mkdir
- Implement auto workspace detection (traverse up to find .workflow)
- Implement auto session location detection (active, archived, lite-plan, lite-fix)
- Add dashboard notifications for tool executions via WebSocket
- Add granular event types (SESSION_CREATED, TASK_UPDATED, etc.)
- Add status_history auto-tracking for task status changes
- Update workflow session commands to document ccw session usage

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 19:26:53 +08:00
catlog22
df104d6e9b feat: enforce synchronous exploration execution and update planning steps 2025-12-10 12:03:12 +08:00
catlog22
417f3c0f8c feat: enhance workflow session management with status updates and CSS styling 2025-12-10 10:01:07 +08:00
catlog22
5114a942dc chore: bump version to 6.1.4
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 22:32:58 +08:00
catlog22
edef937822 feat(v6.1.4): dashboard lite-fix enhancements and workflow docs update
- fix(dashboard): enhance lite-fix session parsing and plan rendering
- docs(workflow): add task status update command example for ccw dashboard

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 22:32:39 +08:00
catlog22
faa86eded0 docs: add changelog entries for 6.1.2 and 6.1.3
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:53:15 +08:00
catlog22
44fa6e0a42 chore: bump version to 6.1.3
- Update README version badge and release notes
- Published to npm with simplified edit_file CLI

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:52:43 +08:00
catlog22
be9a1c76d4 refactor(tool): simplify edit_file to parameter-based input only
- Remove JSON input support, use CLI parameters only
- Remove line mode, keep text replacement only
- Add sed as line operation alternative in tool-strategy.md
- Update documentation to English

Usage: ccw tool exec edit_file --path file.txt --old "old" --new "new"

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:50:35 +08:00
catlog22
fcc811d6a1 docs(readme): update to v6.1.2 and simplify installation
- Update version badge and release notes to v6.1.2
- Remove one-click script install section (npm only)
- Update changelog highlights for latest release

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 15:41:39 +08:00
catlog22
906404f075 feat(server): add API endpoint for version check 2025-12-09 14:39:07 +08:00
catlog22
1267c8d0f4 feat(dashboard): add npm version update notification
- Add /api/version-check endpoint to check npm registry for updates
- Create version-check.js component with update banner UI
- Add CSS styles for version update banner
- Fix hook manager button event handling (use e.currentTarget)
- Bump version to 6.1.2

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 14:38:55 +08:00
catlog22
eb1093128e docs(skill): fix project name from "Claude DMS3" to "Claude Code Workflow"
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 14:38:55 +08:00
catlog22
4ddeb6551e Merge pull request #36 from gurdasnijor/smithery/add-badge
Add "Run in Smithery" badge
2025-12-09 10:30:05 +08:00
Gurdas Nijor
7252c2ff3d Add Smithery badge 2025-12-08 16:10:45 -08:00
catlog22
8dee45c0a3 chore: bump version to 6.1.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 00:04:17 +08:00
catlog22
99ead8b165 fix(tool): add smart JSON parser with Windows path handling
- Auto-fix Windows backslash paths in JSON input
- Provide helpful hints when path escaping errors occur

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 00:03:23 +08:00
catlog22
0c7f13d9a4 docs: update README to v6.1.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 00:01:13 +08:00
catlog22
ed32b95de1 chore: bump version to 6.1.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 23:52:14 +08:00
catlog22
beacc2e26b Fix icon duplications and add navigation color scheme
- Add color variables for navigation items (info, indigo, orange)
- Apply distinct colors to navigation items:
  * Active: green
  * Archived: blue
  * Lite Plan: indigo
  * Lite Fix: orange
- Fix icon conflicts in review session:
  * Change Dimensions icon from 📋 to 🎯
  * Change Location icon from 📄 to 📍
  * Change Root Cause icon from 🔍 to 🎯
- Add active state styles for each navigation item type
- Support both light and dark themes
2025-12-08 23:50:50 +08:00
catlog22
389621c954 fix(dashboard): replace emoji icons in tabs-context and tabs-other components
- tabs-context.js: package, clipboard-list, building-2, code-2, file-code, link, flask-conical, eye icons
- tabs-other.js: file-text, ruler, eye, blocks, package, git-branch, plug icons for exploration sections
- Update all empty state icons to use Lucide
- Update asset category icons (documentation, source code, tests)
- Update exploration titles with Lucide icons
2025-12-08 23:34:14 +08:00
catlog22
2ba7756d13 fix(dashboard): replace task status emoji icons with Lucide icons in session-detail
- Replace ✓/○/⟳ with check-circle/circle/loader-2 icons
- Update formatStatusLabel() to return HTML with Lucide icons
- Update task stats bar and bulk action buttons
- Simplify toast messages to avoid HTML in text content
- Add lucide.createIcons() call in updateTaskStatsBar()
2025-12-08 23:31:01 +08:00
catlog22
02f77c0a51 fix(dashboard): add missing Lucide icon initialization in project-overview and session-detail views 2025-12-08 23:24:17 +08:00
catlog22
5aa8d37cd0 fix(dashboard): ensure Lucide icons are initialized after all dynamic content renders
- Add lucide.createIcons() calls in renderSessions, renderProjectOverview, renderMcpManager, renderHookManager, renderLiteTasks, showSessionDetailPage
- Fixes issue where icons would not appear after page render
2025-12-08 23:23:40 +08:00
catlog22
a7b8ffc716 feat(explorer): async task execution, CLI selector fix, WebSocket frame handling
- Task queue now executes tasks in parallel using Promise.all
- addFolderToQueue uses selected CLI tool instead of hardcoded 'gemini'
- Added CSS styles for queue-cli-selector toolbar
- Force refresh notification list after all tasks complete
- Fixed WebSocket frame parsing to handle Ping/Pong control frames
- Respond to Ping with Pong, ignore other control frames
- Eliminates garbled characters in WebSocket logs
2025-12-08 23:21:47 +08:00
catlog22
b0bc53646e feat(dashboard): complete icon unification across all views
- Update home.js: inbox, calendar, list-checks icons
- Update project-overview.js: code-2, blocks, component, git-branch, sparkles, bug, wrench, book-open icons
- Update session-detail.js: list-checks, package, file-text, ruler, scale, search icons for tabs
- Update lite-tasks.js: zap, file-edit, wrench, calendar, list-checks, ruler, package, file-text icons
- Update mcp-manager.js: plug, building-2, user, map-pin, check-circle, x-circle, circle-dashed, lock icons
- Update hook-manager.js: webhook, pencil, trash-2, clock, check-circle, bell, octagon-x icons
- Add getHookEventIconLucide() helper function
- Initialize Lucide icons after dynamic content rendering

All emoji icons replaced with consistent Lucide SVG icons
2025-12-08 23:14:48 +08:00
catlog22
5f31c9ad7e feat(dashboard): unify icons with Lucide Icons library
- Introduce Lucide Icons via CDN for consistent SVG icons
- Replace emoji icons with Lucide SVG icons in sidebar navigation
- Fix Sessions/Explorer icon confusion (📁/📂 → history/folder-tree)
- Update top bar icons (logo, theme toggle, search, refresh)
- Update stats section icons with colored Lucide icons
- Add icon animations support (animate-spin for loading states)
- Update Explorer view with Lucide folder/file icons
- Support dark/light theme icon adaptation

Icon mapping:
- Explorer: folder-tree (was 📂)
- Sessions: history (was 📁)
- Overview: bar-chart-3
- Active: play-circle
- Archived: archive
- Lite Plan: file-edit
- Lite Fix: wrench
- MCP Servers: plug
- Hooks: webhook
2025-12-08 22:58:42 +08:00
catlog22
818d9f3f5d Add enhanced styles for the review tab, including layout, buttons, and responsive design 2025-12-08 22:11:14 +08:00
catlog22
1c3c070db4 fix(tools): 修复CLI工具多行prompt的shell转义问题
修复文件:
- update-module-claude.js
- generate-module-docs.js

主要修复:
- 使用临时文件+stdin管道传递prompt,避免shell转义问题
- 添加Windows PowerShell兼容性支持
- 添加执行日志输出便于调试
- 添加临时文件清理逻辑

技术细节:
- gemini/qwen: 使用 cat file | tool 方式
- codex: 使用 \ 命令替换
- Windows: 使用 Get-Content -Raw | tool
2025-12-08 21:56:41 +08:00
catlog22
91e4792aa9 feat(ccw): 添加 ccw tool exec 工具系统
新增工具:
- edit_file: AI辅助文件编辑 (update/line模式)
- get_modules_by_depth: 项目结构分析
- update_module_claude: CLAUDE.md文档生成
- generate_module_docs: 模块文档生成
- detect_changed_modules: Git变更检测
- classify_folders: 文件夹分类
- discover_design_files: 设计文件发现
- convert_tokens_to_css: 设计token转CSS
- ui_generate_preview: UI预览生成
- ui_instantiate_prototypes: 原型实例化

使用方式:
  ccw tool list              # 列出所有工具
  ccw tool exec <name> '{}'  # 执行工具

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 21:10:31 +08:00
catlog22
813bfa8f97 fix(claude): 修复 ccw tool exec 命令格式 - 位置参数改为JSON格式
修复内容:
- 将位置参数格式改为JSON格式: ccw tool exec tool '{"param":"value"}'
- 修复双引号字符串内的JSON引号转义问题
- 更新deprecated脚本的使用示例

受影响文件:
- commands/memory/update-full.md, docs-full-cli.md, docs-related-cli.md, update-related.md
- commands/workflow/ui-design/generate.md, import-from-code.md
- scripts/*.sh (9个deprecated脚本)
- skills/command-guide/reference/* (通过analyze_commands.py自动同步)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 21:09:21 +08:00
catlog22
8b29f6bb7c chore: bump version to 6.0.5 2025-12-08 10:29:10 +08:00
catlog22
27273405f7 feat: CCW Dashboard 增强 - 停止命令、浏览器修复和MCP多源配置
- 新增 ccw stop 命令支持优雅停止和强制终止 (--force)
- 修复 ccw view 服务器检测时浏览器无法打开的问题
- MCP 配置现在从多个源读取:
  - ~/.claude.json (项目级)
  - ~/.claude/settings.json 和 settings.local.json (全局)
  - 各工作空间的 .claude/settings.json (工作空间级)
- 新增全局 MCP 服务器显示区域
- 修复路径选择模态框样式问题

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 10:28:07 +08:00
catlog22
f4299457fb fix(package): 调整依赖项顺序以提高可读性 2025-12-08 10:00:42 +08:00
catlog22
06983a35ad fix(dashboard): 添加路径选择弹窗样式
- 修复 path-modal 样式丢失问题
- 添加完整的弹窗样式定义

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 09:59:15 +08:00
catlog22
a80953527b feat(ccw): 智能识别运行中的服务器,支持工作空间切换
- ccw view 自动检测服务器是否已运行
- 已运行时切换工作空间并打开浏览器,无需重启服务器
- 新增 /api/switch-path 和 /api/health 端点
- Dashboard 支持 URL path 参数加载指定工作空间

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 09:56:35 +08:00
catlog22
0f469e225b fix: 添加 ccw/package.json 到发布文件列表 2025-12-07 22:59:43 +08:00
catlog22
5dca69fbec chore: bump version to 6.0.1 2025-12-07 21:42:50 +08:00
catlog22
ac626e5895 feat: Review Session增加Fix进度跟踪卡片,移除独立Dashboard模板
- 新增Fix Progress跟踪卡片(走马灯样式)显示修复进度
- 添加/api/file端点支持读取fix-plan.json
- 移除review-fix/module-cycle/session-cycle中的独立dashboard生成
- 删除废弃的workflow-dashboard.html和review-cycle-dashboard.html模板
- 统一使用ccw view命令查看进度

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 21:41:43 +08:00
catlog22
cb78758839 docs: 更新 README 添加 npm 安装和 ccw CLI 说明
- 版本更新到 v6.0.0
- 添加 npm badge 和安装说明
- 新增 CCW CLI Tool 章节,说明所有命令
- 更新 description 为 JSON-driven multi-agent framework
- 修复 package.json 循环依赖

安装: npm install -g claude-code-workflow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 20:56:58 +08:00
catlog22
844a2412b2 chore: 配置 npm 发布 @dyw1234/claude-code-workflow@6.0.0
- 添加 package.json 到项目根目录
- 配置 scoped package @dyw1234/claude-code-workflow
- 添加 .npmignore 排除不必要文件
- 发布 v6.0.0 到 npm registry

安装方式: npm install -g @dyw1234/claude-code-workflow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 20:42:23 +08:00
catlog22
650d877430 feat: Dashboard 增强 - MCP管理器、Review Session 和 UI 改进
- 添加 MCP Manager 组件,支持服务器状态管理
- 增强 Review Session 视图,添加 conflict/review tabs
- 新增 _conflict_tab.js 和 _review_tab.js 组件
- 改进 carousel、tabs-other 等组件
- 大量 CSS 样式更新和优化
- home.js 添加新功能支持

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 20:07:29 +08:00
catlog22
f459061ad5 refactor: 简化 ccw 安装流程,移除远程下载功能
- 删除 version-fetcher.js,移除 GitHub API 依赖
- install.js: 移除远程版本选择,只保留本地安装
- upgrade.js: 重写为本地升级,比对包版本与已安装版本
- cli.js: 移除 -v/-t/-b 等版本相关选项
- 添加 CLAUDE.md 复制到 .claude 目录的逻辑

版本管理统一到 npm:npm install -g ccw@版本号

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 20:03:10 +08:00
catlog22
a6f9701679 Add exploration field rendering helpers for dynamic content display
- Implemented `renderExpField` to handle various data types for exploration fields.
- Created `renderExpArray` to format arrays, including support for objects with specific properties.
- Developed `renderExpObject` for recursive rendering of object values, filtering out private keys.
- Introduced HTML escaping for safe rendering of user-generated content.
2025-12-07 18:07:28 +08:00
catlog22
26a325efff feat: 添加最近路径管理功能,包括删除路径的API和前端交互 2025-12-07 17:35:10 +08:00
catlog22
0a96ee16a8 Add tool strategy documentation with triggering mechanisms and text processing references
- Introduced auto and manual triggering mechanisms for Exa.
- Added quick reference guides for sed and awk text processing.
- Established a fallback strategy for handling edit failures.
2025-12-07 17:09:07 +08:00
catlog22
43c962b48b feat: Add Notifications Component with WebSocket and Auto Refresh
- Implemented a Notifications component for real-time updates using WebSocket.
- Added silent refresh functionality to update data without notification bubbles.
- Introduced auto-refresh mechanism to periodically check for changes in workflow data.
- Enhanced data handling with session and task updates, ensuring UI reflects the latest state.

feat: Create Hook Manager View for Managing Hooks

- Developed a Hook Manager view to manage project and global hooks.
- Added functionality to create, edit, and delete hooks with a user-friendly interface.
- Implemented quick install templates for common hooks to streamline user experience.
- Included environment variables reference for hooks to assist users in configuration.

feat: Implement MCP Manager View for Server Management

- Created an MCP Manager view for managing MCP servers within projects.
- Enabled adding and removing servers from projects with a clear UI.
- Displayed available servers from other projects for easy access and management.
- Provided an overview of all projects and their associated MCP servers.

feat: Add Version Fetcher Utility for GitHub Releases

- Implemented a version fetcher utility to retrieve release information from GitHub.
- Added functions to fetch the latest release, recent releases, and latest commit details.
- Included functionality to download and extract repository zip files.
- Ensured cleanup of temporary directories after downloads to maintain system hygiene.
2025-12-07 15:48:39 +08:00
catlog22
724545ebd6 Remove backup HTML template for workflow dashboard 2025-12-07 12:59:59 +08:00
catlog22
a9a2004d4a feat(dashboard): add context sections for assets, dependencies, test context, and conflict detection 2025-12-06 21:04:50 +08:00
catlog22
5b14c8a832 feat: add project overview section and enhance task item styles
- Introduced a new project overview section in the dashboard, displaying project details, technology stack, architecture, key components, and development history.
- Updated the server logic to include project overview data.
- Enhanced task item styles with status-based background colors for better visual distinction.
- Improved markdown modal functionality for viewing context and implementation plan with normalized line endings.
- Refactored task rendering logic to simplify task item display and improve performance.
2025-12-06 20:50:23 +08:00
catlog22
e2c5a514cb fix(data-aggregator): remove extra closing brace causing syntax error
- Fixed loadDimensionData function that had duplicate closing brace
- This was preventing review session dimension data from being parsed

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:59:45 +08:00
catlog22
296761a34e style(dashboard): enhance step numbers and mod-point card styling
- Change step numbers from circles to rounded rectangles
- Add shadow to step number badges for depth
- Enhance mod-point-card with full border and stronger left accent
- Add hover effect with elevated shadow on mod-point-card

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:52:36 +08:00
catlog22
1d3436d51b feat(dashboard): simplify lite task list and add dedicated drawer
- Remove META/CONTEXT/FLOW_CONTROL collapsible sections from task list
- Add compact task item with action/scope/mods/steps badges
- Create dedicated renderLiteTaskDrawerContent for plan.json parsing
- Add Overview tab with description, scope, acceptance, dependencies
- Add Implementation tab with steps and modification points
- Add proper file list extraction from modification_points
- Add CSS styles for lite task badges and drawer components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:51:37 +08:00
catlog22
60bb11c315 feat(dashboard): simplify lite task UI and add exploration context support
- Remove status indicators from lite task cards (progress bars, percentages)
- Remove status icons and badges from task detail items
- Remove stats bar showing completed/in-progress/pending counts
- Add Plan tab in drawer for plan.json data display
- Add exploration-*.json parsing for context tab
- Add collapsible sections for architecture, dependencies, patterns
- Fix currentPath selector bug causing TypeError

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:47:49 +08:00
catlog22
72fe6195af fix: update Codex multiplier to reflect new time allocation guidelines 2025-12-05 11:14:42 +08:00
catlog22
04fb3b7ee3 feat(dashboard): add plan data loading and lite task detail styling
- Add plan.json data loading to getSessionDetailData function for lite tasks
- Implement plan tab content styling with summary and approach sections
- Add plan metadata grid layout for displaying task planning information
- Create lite task detail page styles with task stats bar and status indicators
- Add context tab content styling with improved section hierarchy
- Implement path tags and JSON content display styles for plan details
- Add collapsible sections for organizing plan information
- Create comprehensive styling for context fields, modification points, and implementation steps
- Add array and nested object rendering styles for JSON data visualization
- Implement button styles for JSON view toggle functionality
2025-12-04 22:55:56 +08:00
catlog22
942fca7ad8 refactor(dashboard): optimize template structure and enhance data aggregation
- Reorder CSS and JS file loading in dashboard-generator.js for consistency
- Simplify dashboard.css by removing redundant styles and consolidating to Tailwind-based approach
- Add backup files for dashboard.html, dashboard.css, and review-cycle-dashboard.html
- Create new Tailwind-based dashboard template (dashboard_tailwind.html) and test variant
- Add tailwind.config.js for Tailwind CSS configuration
- Enhance data-aggregator.js to load full task data for archived sessions (previously only counted)
- Add meta, context, and flow_control fields to task objects for richer data representation
- Implement review data loading for archived sessions to match active session behavior
- Improve task sorting consistency across active and archived sessions
- Reduce CSS file size by ~70% through Tailwind utility consolidation while maintaining visual parity
2025-12-04 21:41:30 +08:00
catlog22
39df995e37 Refactor code structure for improved readability and maintainability 2025-12-04 17:22:25 +08:00
catlog22
efaa8b6620 fix: Refine action-planning-agent documentation for clarity and structure 2025-12-04 09:47:53 +08:00
catlog22
35bd0aa8f6 feat: Add workflow dashboard template and utility functions
- Implemented a new HTML template for the workflow dashboard, featuring a responsive design with dark/light theme support, session statistics, and task management UI.
- Created a browser launcher utility to open HTML files in the default browser across platforms.
- Developed file utility functions for safe reading and writing of JSON and text files.
- Added path resolver utilities to validate and resolve file paths, ensuring security against path traversal attacks.
- Introduced UI utilities for displaying styled messages and banners in the console.
2025-12-04 09:40:12 +08:00
catlog22
0f9adc59f9 docs: Remove deprecated CLI commands, clarify semantic invocation
Addresses issue #33 - /cli:mode:bug-diagnosis command not found

Changes:
- Remove deprecated /cli:* commands (/cli:analyze, /cli:chat, /cli:execute,
  /cli:codex-execute, /cli:discuss-plan, /cli:mode:*) from documentation
- Only /cli:cli-init remains as the sole CLI command
- Update all references to use /workflow:lite-plan, /workflow:lite-fix
- Clarify that CLI tools are now invoked through semantic invocation
  (natural language) - Claude auto-selects Gemini/Qwen/Codex with templates
- Update COMMAND_SPEC.md, COMMAND_REFERENCE.md, GETTING_STARTED*.md,
  FAQ.md, WORKFLOW_DECISION_GUIDE*.md, workflow-architecture.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:05:40 +08:00
catlog22
c43a72ef46 release: v5.9.8 - Brainstorm workflow improvements and documentation updates
## Changes
- Simplify analysis output strategy to optional modular structure
- Update synthesis/artifacts documentation to use AskUserQuestion tool
- Add modular output strategy for brainstorm analysis
- Simplify clarification deduplication in lite-plan
- Add "Fix, Don't Hide" section to CLAUDE.md guidelines
- Simplify project.json schema by removing unused fields
- Update session ID format in lite-fix/lite-plan workflows
- Add development index to project JSON schema

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:45:04 +08:00
catlog22
7a61119c55 fix: Enhance session folder creation with success/failure feedback in lite-fix and lite-plan workflows 2025-12-02 14:47:08 +08:00
catlog22
d620eac621 fix: Remove file path reference from AGENTS.md 2025-12-01 22:18:44 +08:00
catlog22
1dbffbee2d fix: Enforce multi-round clarification in lite-plan and lite-fix
Add explicit instructions to execute ALL clarification rounds when >4
questions exist. AskUserQuestion tool limits max 4 per call, so multi-round
execution is mandatory to exhaust all clarification needs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:44:00 +08:00
catlog22
c67817f46e fix: Clarify multi-round clarification and enforce session timestamp format
- Phase 2 Clarification: max 4 questions per round, multiple rounds allowed
- Session Setup: MANDATORY timestamp in sessionId format (slug-YYYY-MM-DD-HH-mm-ss)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:25:48 +08:00
catlog22
d654419423 feat: Add recommended selection to clarification questions
- Add recommended field to explore-json-schema.json clarification_needs
- Update lite-plan/lite-fix/context-gather agent prompts
- Display ★ marker and (Recommended) label in AskUserQuestion options

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 18:25:32 +08:00
catlog22
1e2240dbe9 docs: Add minimize changes principle to CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 18:21:24 +08:00
catlog22
b3778ef48c fix: Use UTC+8 timezone for lite-fix session timestamps
Add getUtc8ISOString() helper function to generate China Standard Time
timestamps instead of UTC. Applied to:
- Session ID generation (shortTimestamp)
- Diagnosis manifest timestamp
- Direct planning metadata timestamp

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:12:27 +08:00
catlog22
a16cf5c8d3 fix: Use UTC+8 timezone for lite-plan session timestamps
Add getUtc8ISOString() helper function to generate China Standard Time
timestamps instead of UTC. Applied to:
- Session ID generation (shortTimestamp)
- Exploration manifest timestamp
- Direct planning metadata timestamp

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:10:58 +08:00
catlog22
d82bf5a823 fix: Preserve user intent in test workflow session creation
- Add Step 1.0 to test-gen.md to load source session task_description
- Add Step 1.0 to test-fix-gen.md (Session Mode) to load original user intent
- Include originalTaskDescription in session creation to enable semantic CLI selection
- Fixes data flow gap identified by Gemini review: user's CLI tool preferences
  (e.g., "use Codex for fixes") now propagate through test workflow sessions

This ensures semantic CLI tool selection works correctly in derivative test sessions
by preserving the original user's task description from the source session.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 17:06:13 +08:00
catlog22
132eec900c refactor: Replace CLI execution flags with semantic-driven tool selection
- Remove --cli-execute flag from plan.md, tdd-plan.md, task-generate-agent.md, task-generate-tdd.md
- Remove --use-codex flag from test-gen.md, test-fix-gen.md, test-task-generate.md
- Remove meta.use_codex from task JSON schema in action-planning-agent.md and cli-planning-agent.md
- Add "Semantic CLI Tool Selection" section to action-planning-agent.md
- Document explicit source: metadata.task_description from context-package.json
- Update test-fix-agent.md execution mode documentation
- Update action-plan-verify.md to remove use_codex validation
- Sync SKILL reference copies via analyze_commands.py

CLI tool usage now determined semantically from user's task description
(e.g., "use Codex for implementation") instead of explicit flags.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:59:01 +08:00
catlog22
09114f59c8 fix: Complete lite-fix command with diagnosis workflow and schemas
- Add lite-fix.md command based on lite-plan.md structure
- Create diagnosis-json-schema.json for bug diagnosis results
- Create fix-plan-json-schema.json for fix planning
- Update intelligent-tools-strategy.md: simplify model selection, add 5min minimum timeout
- Fix missing _metadata.diagnosis_index in agent prompt
- Clarify --hotfix mode skip behavior

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 11:18:48 +08:00
catlog22
72099ae951 fix: Update agent calls in documentation to reflect changes from gemini-wrapper to gemini 2025-11-29 10:40:36 +08:00
catlog22
d66064024c refactor: Optimize context-gather workflow with Synthesis role clarification
- Rename Track 0 from 'Exploration Aggregation' to 'Exploration Synthesis'
- Add explicit synthesis logic for critical_files prioritization and deduplication
- Enhance explore-json-schema to support relevance scores in relevant_files
- Update explore agent prompts across context-gather and lite-plan commands
- Add synthesizeCriticalFiles and synthesizeConflictIndicators helper functions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 10:38:04 +08:00
catlog22
8c93848303 refactor: Enhance cli-explore-agent prompt in context-gather
Align with lite-plan.md prompt structure:
- Add detailed Task Objective with angle-specific analysis
- Add MANDATORY FIRST STEPS with explicit ordered commands
- Add 3-step Exploration Strategy (Structural Scan, Semantic Analysis, Write Output)
- Add detailed Expected Output with Required Fields
- Add Success Criteria checklist for validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 23:10:06 +08:00
catlog22
57a86ab36f feat: Add parallel explore agents to context-gather workflow
- context-gather.md: Add Step 2 with complexity assessment (Low/Medium/High)
  and parallel cli-explore-agent execution (1-4 agents based on complexity)
- context-search-agent.md: Add Track 0 for exploration aggregation with
  exploration_results schema including all_patterns and all_integration_points
- conflict-resolution.md: Consume exploration_results for enhanced conflict
  detection with pre-identified conflict indicators
- task-generate-agent.md: Use exploration critical_files for focus_paths
  and all_patterns/all_integration_points for implementation guidance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 23:08:20 +08:00
catlog22
e75cdf0b61 docs: Update documentation for v5.9.6 with new commands and features
- Update README_CN.md version badge to v5.9.6
- Update COMMAND_REFERENCE.md with new commands:
  - workflow:lite-fix (bug diagnosis workflow)
  - workflow:lite-execute (in-memory execution)
  - workflow:review-module-cycle (module code review)
  - workflow:review-session-cycle (session code review)
  - workflow:review-fix (automated fixing)
  - memory:docs-* CLI commands
  - memory:skill-memory, tech-research, workflow-skill-memory
- Update analyze_commands.py:
  - Add lite workflows relationships
  - Add review cycle workflows relationships
  - Update essential commands list
- Rebuild command-guide index with updated relationships

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:08:59 +08:00
catlog22
79b13f363b docs: Update README and CHANGELOG for v5.9.3-v5.9.6 releases
- Update version badge to v5.9.6
- Add comprehensive changelog entries for v5.9.3, v5.9.4, v5.9.5, v5.9.6
- Document lite-plan optimization, review-cycle enhancements
- Include lite-fix workflow, test-cycle improvements
- Update feature summary to reflect latest capabilities

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:03:39 +08:00
catlog22
87d5a1292d fix: Update task generation rules to allow 2-7 structured tasks and refine grouping principles 2025-11-28 16:31:00 +08:00
catlog22
3e6ed5e4c3 revert: Restore lite-execute and schema to 196b805, keep 50k context protection
- Revert cost-aware batching and multi-agent parallelism in lite-execute
- Remove execution_group and task complexity from schema
- Remove execution_group rules from lite-plan
- Keep 50k context threshold protection in lite-plan

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:34:14 +08:00
catlog22
96dd9bef5f fix: Add 50k context threshold to prevent orchestrator overflow in lite-plan
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:25:33 +08:00
catlog22
697a646fc9 fix: Enable true multi-agent parallelism with batch-specific task dispatch
- Add executeBatch dispatcher to route batches to Agent/Codex
- Update executeBatchAgent to use batch.tasks instead of planObject.tasks
- Update executeBatchCodex to use batch.tasks instead of planObject.tasks
- Each parallel batch now dispatches to separate concurrent agent

Before: All batches → single agent with ALL tasks (no parallelism)
After:  P1 → Agent 1, P2 → Agent 2 (true concurrent execution)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 12:52:46 +08:00
catlog22
cde17bd668 feat: Add cost-aware parallel execution with execution_group support
- Schema: Add execution_group and task-level complexity fields
- Executor: Hybrid dependency analysis (explicit + file conflicts)
- Executor: Cost-based batching (MAX_BATCH_COST=8, Low=1/Medium=2/High=4)
- Executor: execution_group priority for explicit parallel grouping
- Planner: Add guidance for execution_group and complexity fields

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 12:45:10 +08:00
catlog22
98b72f086d refactor: Move schema loading to Low complexity path only in lite-plan
Schema loading is only needed for direct Claude planning (Low complexity).
The cli-lite-planning-agent handles schema internally for Medium/High complexity.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 11:04:47 +08:00
catlog22
196b805499 refactor: Update task structure and grouping principles in planning and execution schemas for clarity and consistency 2025-11-28 10:56:45 +08:00
catlog22
beb839d8e2 refactor: Add automation framework configuration section to test task generation documentation 2025-11-27 22:38:42 +08:00
catlog22
2aa39bd355 Refactor task attachment terminology across workflow commands to use "dispatch" instead of "invoke" for clarity and consistency. Update documentation to reflect changes in task execution and attachment models, emphasizing the orchestrator's role in executing attached tasks. Adjust phase descriptions and command examples to align with the new terminology. 2025-11-27 21:34:55 +08:00
catlog22
a62d30acb9 refactor: Remove redundant reference to Claude in complexity assessment description 2025-11-27 17:07:42 +08:00
catlog22
8bc5b40957 fix: Add schema reference requirement for Low complexity planning in lite-plan
- Updated execution flow diagram to show schema loading as REQUIRED step
- Added explicit schema reference for Low complexity direct planning
- Ensures plan.json follows consistent structure regardless of complexity level

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 17:06:12 +08:00
catlog22
2a11d5f190 refactor: Add tree-style execution flow diagrams to all workflow commands
Added tree-style execution process diagrams using ASCII art (├─, └─, │) to 34 workflow command files across three directories for improved readability and execution flow clarity.

## Changes by Directory

### workflow/ root (17 files)
- lite-plan.md, lite-execute.md, lite-fix.md
- plan.md, execute.md, replan.md
- status.md, review.md, review-fix.md
- review-session-cycle.md, review-module-cycle.md
- session commands (start, complete, resume, list)
- tdd-plan.md, tdd-verify.md, test-cycle-execute.md, test-gen.md, test-fix-gen.md

### workflow/ui-design/ (10 files)
- layout-extract.md, animation-extract.md, style-extract.md
- generate.md, import-from-code.md, codify-style.md
- imitate-auto.md, explore-auto.md
- reference-page-generator.md, design-sync.md

### workflow/tools/ (8 files)
- conflict-resolution.md, task-generate-agent.md, context-gather.md
- tdd-coverage-analysis.md, task-generate-tdd.md
- test-task-generate.md, test-concept-enhanced.md, test-context-gather.md

## Diagram Features
- Input parsing with flag enumeration
- Decision branching with conditional paths
- Phase/step hierarchy with clear nesting
- Mode detection and validation flows

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 16:13:30 +08:00
catlog22
964bbbf5bc refactor: Simplify lite-plan complexity assessment with Claude intelligent analysis
- Replace keyword-based estimateComplexity() with Claude intelligent analysis
- Remove exploration-driven complexityScore in Phase 3
- Unify complexity assessment to Phase 1 only
- Update Execution Process to tree-style flow diagram
- Fix step numbering error (duplicate step 4 → step 6)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:21:09 +08:00
catlog22
75ad427862 fix: Replace file:// URLs with local HTTP server for dashboard access
Dashboards use fetch() API which doesn't work with file:// protocol due to
browser CORS restrictions. Now starts Python HTTP server for proper access.

- review-module-cycle: port 8765
- review-session-cycle: port 8765
- review-fix: port 8766 (different port for concurrent use)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 14:14:48 +08:00
catlog22
edda988790 feat: Add guideline to avoid complex bash pipe chains in test-fix-agent
Prefer dedicated tools (Read, Grep, Glob) over multi-pipe bash commands for file operations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:59:45 +08:00
catlog22
a8961761ec feat: Add run_in_background=false guideline for test-fix-agent
Ensure Bash() commands run tests in foreground for proper output capture.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:28:47 +08:00
catlog22
2b80a02d51 feat: Add non-interrupting execution guideline to session start command
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:23:19 +08:00
catlog22
969242dbbc fix: Remove outdated agent output file descriptions from review-fix.md 2025-11-26 20:20:20 +08:00
catlog22
ef09914f94 fix: Standardize Execution Flow phase naming and remove redundant REVIEW-SUMMARY.md output
- Unify phase numbering format to "Phase X:" across all review workflow commands
- Add missing Phase 5: Session Completion to review-fix.md
- Replace "Update dashboard" with "Generate fix-dashboard.html" to clarify initialization vs polling
- Remove REVIEW-SUMMARY.md generation (dashboard serves as primary output)
- Align phase names with Orchestrator section (e.g., "Planning Coordination", "Execution Orchestration")

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 20:16:35 +08:00
catlog22
2f4ecf9ae3 feat: Update review-fix.md to reflect changes in dashboard update process and output handling 2025-11-26 20:08:44 +08:00
catlog22
b000359e69 feat: Enhance fix-dashboard.html to consume more JSON fields from review-fix workflow
- Add errors array display with badge and detailed error list in Active Agents
- Enhance task cards with dimension badge, file:line, attempts, and commit hash
- Add Finding Details Modal with complete information on click
- Display fix_strategy and risk_assessment in Active Groups cards
- Add renderAgentErrors(), renderStrategyAndRisk() helper functions
- Increase JSON field consumption rate from ~53% to ~90%

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 19:59:33 +08:00
catlog22
84b428b52f feat: Add independent fix tracking dashboard with theme support
This commit introduces an independent fix progress tracking system with
enhanced visualization and theme customization.

Changes:
- Create standalone fix-dashboard.html with dark/light theme toggle
- Add comprehensive task visualization with status filtering
- Implement real-time progress tracking with 3-second polling
- Add stage timeline with parallel/serial execution visualization
- Include flow control steps tracking for active agents
- Simplify state management (remove fix-state.json, use metadata in fix-plan.json)
- Update review-fix.md documentation with dashboard generation steps
- Change template references from @ to cat command syntax

Dashboard Features:
- Theme toggle (dark/light) with localStorage persistence
- Task cards grid with status-based filtering (all/pending/in-progress/fixed/failed)
- Tab-based view for Active Groups and Active Agents
- Enhanced progress bar with gradient and shimmer animation
- Stage timeline with visual status indicators
- Fix history drawer for session review
- Fully responsive design for mobile devices

Technical Improvements:
- Consumes new JSON structure (fix-plan.json with metadata field)
- Real-time aggregation from multiple fix-progress-{N}.json files
- Single HTML file (self-contained, no external dependencies)
- Static generation (created once in Phase 1, no subsequent modifications)
- Browser-side polling for status updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 18:59:19 +08:00
catlog22
2443c64c61 fix: Remove duplicate 'fix-export-' prefix in export filename
Problem: Export filename was 'fix-export-fix-export-1764148101709.json'
Root cause: export_id already contained 'fix-export-' prefix, then filename construction added it again

Solution: Keep export_id as timestamp only, let filename construction add the prefix
Result: Correct filename 'fix-export-1764148101709.json'
2025-11-26 17:10:54 +08:00
catlog22
f7593387a0 feat: Enhance review-cycle dashboard with real-time progress and advanced filtering
Dashboard Improvements:
- Real-time incremental dimension loading (no longer waits for phase=complete)
- Progress bar now based on actual dimension file count (e.g., 6/7 = 85%)
- Display findings as they become available during agent execution

Export Enhancements:
- Show detailed export path recommendations pointing to session directory
- Provide Windows/Mac/Linux commands to move files from Downloads
- Display complete usage instructions with file paths

Advanced Filtering & Sorting:
- Multi-select severity filter (can combine Critical + High, etc.)
- Sort by: Severity / Dimension / File / Title
- Toggle sort order: Ascending ↑ / Descending ↓
- One-click "Reset All Filters" button

Smart Selection:
- "Select Visible" - selects only filtered findings
- "Critical Only" - quick select all critical findings
- Enhanced selection counter and UI feedback

Technical Changes:
- Replace single severity filter with Set-based multi-select
- Add sortConfig with order tracking (asc/desc)
- Auto-sort after filtering for consistent UX
- Enhanced search to include category field
- Improved dimension status indicators (✓ completed,  processing)

User Experience:
- Real-time visibility into agent progress (6/7 dimensions, 108 findings)
- Flexible filtering combinations for targeted analysis
- Export workflow guidance with copy-paste commands
- Responsive filter layout with visual feedback
2025-11-26 16:57:19 +08:00
catlog22
64674803c4 feat: Enhance export notifications with detailed usage instructions and recommended file locations 2025-11-26 16:32:13 +08:00
catlog22
1252f4f7c6 feat: Enhance progress tracking and UI updates for dimension loading 2025-11-26 16:26:16 +08:00
catlog22
c862ac225b fix: Remove comment on timeout value for CLI execution 2025-11-26 16:04:52 +08:00
catlog22
5375c991ba fix: Increase timeout for CLI execution to 10 minutes 2025-11-26 16:04:34 +08:00
catlog22
7b692ce415 refactor: Clarify agent schema reading with explicit cat commands
Replaced ambiguous "Read: schema.json" instructions with explicit
"Execute: cat schema.json" commands to eliminate orchestrator/agent
responsibility confusion. Updated in three key sections:

- MANDATORY FIRST STEPS: Added "Execute by Agent" header with explicit
  cat command for schema retrieval
- Expected Deliverables: Shortened to reference prior schema step
- Success Criteria: Simplified to "Schema obtained via cat"

Files modified:
- lite-plan.md: explore-json-schema.json + plan-json-schema.json
- review-module-cycle.md: dimension results + deep-dive schemas
- review-session-cycle.md: dimension results + deep-dive schemas

Benefits:
- Removes ambiguity about who reads schema (always agent, never orchestrator)
- Uses direct command syntax ("cat") instead of passive language
- Consistent English-only phrasing across all three files
- Three-point reinforcement ensures agents execute schema reading
2025-11-26 16:02:00 +08:00
catlog22
2cf8efec74 refactor: Optimize review cycle dashboard generation and merge JSON state files
Changes:
- Dashboard generation: Split piped command into 4 independent steps (cp + 3x sed -i) for higher success rate
- JSON consolidation: Merge review-metadata.json into review-state.json (2 files instead of 3)
- Enhanced constraints: Add mandatory template usage requirements and post-generation modification prohibitions
- Updated documentation: Sync changes across review-module-cycle and review-session-cycle

Benefits:
- Reduced command execution failures with independent steps
- Simplified state management with unified metadata+state JSON
- Clearer orchestrator/agent boundaries for dashboard interaction
2025-11-26 15:32:56 +08:00
catlog22
34a9a23d5b fix: Add explicit JSON schema requirements to review cycle agent prompts
Move specific JSON structure requirements from cli-explore-agent (keep generic)
to review-*-cycle.md prompts. Key requirements now inline in prompts:
- Root must be array [{}] not object {}
- analysis_timestamp field (not timestamp/analyzed_at)
- Flat summary structure (not nested by_severity)
- Lowercase severity/id values
- Correct field names (snippet not code_snippet, impact not exploit_scenario)
2025-11-26 15:15:30 +08:00
catlog22
cf6a0f1bc0 refactor: Simplify cli-explore-agent with prompt-driven architecture
- Restructure cli-explore-agent.md from 620 to 165 lines
- Replace hardcoded task types with prompt-based extraction
- Add 4-phase workflow: Task Understanding → Analysis → Schema Validation → Output
- Emphasize mandatory schema reading before JSON output
- Remove inline output templates, reference external schema files
- Update code-map-memory.md to use codemap-json-schema.json
2025-11-26 15:07:22 +08:00
catlog22
247db0d041 Refactor lite-execute and lite-plan workflows to support plan.json format, enhance task structure, and improve exploration angle assignment. Update review cycle dashboard with dimension summary table and associated styles. Modify plan JSON schema to include new properties and adjust validation rules. 2025-11-26 11:31:15 +08:00
catlog22
fec5d9a605 refactor: Simplify and standardize TodoWrite structure in review-module-cycle and review-session-cycle documentation for clarity 2025-11-26 10:31:04 +08:00
catlog22
97fea9f19e refactor: Remove resume option from argument hints in review-module-cycle and review-session-cycle documentation for clarity 2025-11-26 10:26:14 +08:00
catlog22
6717e2a59b refactor: Update review-fix command examples and output structure for clarity and consistency 2025-11-26 10:00:18 +08:00
catlog22
84c180ab66 refactor: Simplify and streamline agent documentation and output schemas for clarity and consistency 2025-11-26 09:37:14 +08:00
catlog22
e70f086b7e refactor: Update file paths in documentation to use relative paths for consistency and clarity 2025-11-25 23:48:58 +08:00
catlog22
6359a364cb refactor: Remove outdated examples and related commands from review-module-cycle documentation for clarity 2025-11-25 23:03:27 +08:00
catlog22
8f2126677f refactor: Update review commands to require active sessions and unify output directory structure for improved organization and clarity 2025-11-25 23:02:20 +08:00
catlog22
c3e87db5be refactor: Enhance task objectives and output requirements in review-fix command for improved clarity and structure 2025-11-25 22:23:56 +08:00
catlog22
a6561a7d01 feat: Enhance exploration schema and introduce automated review-fix workflow
- Added new fields to the exploration JSON schema: exploration_angle, exploration_index, and total_explorations for better tracking of exploration parameters.
- Created a comprehensive review-fix command documentation to automate code review findings fixing, detailing the workflow, execution flow, agent roles, and error handling.
- Introduced fix-plan-template.json for structured planning output, including execution strategy, group definitions, and risk assessments.
- Added fix-progress-template.json to track progress for each group during the execution phase, ensuring real-time updates and status management.
2025-11-25 22:01:01 +08:00
catlog22
4bd732c4db refactor: enhance multi-angle exploration context in lite-execute command output 2025-11-25 20:01:43 +08:00
catlog22
152303f1b8 refactor: optimize TodoWrite format with hierarchical display across workflow commands
Adopt consistent hierarchical TodoWrite format for better visual clarity:
- Phase-level tasks: "Phase N: Description"
- Sub-tasks: "  → Sub-task description" (indented with arrow)
- Clear parent-child relationships through visual hierarchy
- Task attachment/collapse pattern visualization

Updated commands:
- lite-plan.md (Phase 1-4 examples)
- auto-parallel.md (Phase 0-3 examples)
- tdd-plan.md (Phase 3-5 examples)
- test-fix-gen.md (TodoWrite Pattern with examples)
- explore-auto.md (TodoWrite Pattern)
- imitate-auto.md (TodoWrite Pattern)
- review-session-cycle.md
- review-module-cycle.md

Benefits:
- Visual hierarchy shows task relationships
- Expanded view shows detailed progress
- Collapsed view maintains clean orchestrator-level summary
- Consistent format across all multi-phase workflows
2025-11-25 19:54:33 +08:00
catlog22
2d66c1b092 refactor: update task descriptions and statuses in workflow plan for clarity 2025-11-25 19:44:24 +08:00
catlog22
93d8e79b71 feat: add comprehensive review-session-cycle command for multi-dimensional code analysis
- Introduced a new command `/workflow:review-session-cycle` for session-based code reviews across 7 dimensions.
- Implemented hybrid parallel-iterative execution to enhance review efficiency and coverage.
- Added detailed documentation outlining command usage, execution flow, and agent roles.
- Configured specialized dimensions with priority-based allocation and defined severity assessment criteria.
- Established a robust aggregation logic for identifying cross-cutting concerns and critical findings.
- Enabled real-time progress tracking through an interactive HTML dashboard.
- Included mechanisms for deep-dive analysis and remediation planning for critical issues.
2025-11-25 17:15:37 +08:00
catlog22
1e69539837 refactor: update documentation for review-cycle and test-cycle-execute workflows 2025-11-25 16:26:45 +08:00
catlog22
cd206f275e Add JSON schemas for deep-dive results and dimension analysis
- Introduced `review-deep-dive-results-schema.json` to define the structure for deep-dive iteration analysis results, including root cause analysis, remediation plans, and impact assessments.
- Added `review-dimension-results-schema.json` to outline the schema for dimension analysis results, capturing findings across various dimensions such as security and architecture, along with cross-references to related findings.
2025-11-25 16:16:11 +08:00
catlog22
d99448ffd5 feat: add syntax check priority in @test-fix-agent prompt
Enhancement:
- Added "CRITICAL: Syntax Check Priority" section in @test-fix-agent template
- Positioned before Session Paths for maximum visibility

Requirements:
- Run syntax checker (TypeScript tsc --noEmit, ESLint, etc.) BEFORE any work
- Verify zero syntax errors before proceeding
- Fix syntax errors immediately if found
- Syntax validation is MANDATORY gate - no exceptions

Scope:
- Applies to all task types (test-gen, test-fix, test-fix-iteration)
- Agent-level enforcement (not in orchestrator flow)

Rationale:
- Syntax errors must be fixed before functional testing
- Prevents cascading failures from basic syntax issues
- Reduces iteration waste on trivial syntax problems
2025-11-25 11:22:11 +08:00
catlog22
217f30044a refactor: remove parallel strategy exploration feature
Removed Features:
- Parallel Strategy Exploration (3. Enhanced Features)
- Exploratory strategy from strategy engine
- Git worktree-based parallel execution
- IMPL-fix-{N}-parallel.json task type

Strategy Engine Changes:
- Removed "Exploratory" strategy (was: stuck tests trigger)
- Updated selection logic: conservative → aggressive → surgical
- Simplified to 3 strategies (was 4)

File Structure Changes:
- Removed IMPL-fix-{N}-parallel.json from session structure
- Removed worktrees from commit content exclusions

Error Handling Changes:
- Updated stuck tests handling: "Continue with alternative strategy, document in failure report"
- No longer switches to exploratory/parallel mode

Commit Strategy Changes:
- Removed "After Parallel Exploration" commit checkpoint
- Renumbered checkpoints: 1. Success, 2. Rollback (was 1,2,3)

Documentation Changes:
- Removed Value Proposition #4 (Stuck Handling via parallel)
- Updated execution flow (removed exploratory alternatives)
- Removed Strategy-Specific Requirements for Exploratory
- Removed Best Practices #6 (Parallel Exploration)
- Applied user changes: removed "Simplified Structure" text, updated CLI to "gemini & codex"

Rationale: Simplify workflow by removing parallel execution complexity
Lines: 596 → 494 (-17%, total -38% from original 791)
2025-11-25 09:28:00 +08:00
catlog22
7e60e3e198 refactor: remove redundant fields from task JSON and simplify data structure 2025-11-25 09:16:04 +08:00
catlog22
783ee4b570 refactor: remove hardcoded model specification in agent invocation
Changes:
- Removed model="haiku" from @test-fix-agent parallel invocation
- Use default model selection for flexibility
- Updated comment to remove model reference

Rationale:
- Let system auto-select appropriate model
- Avoid hardcoded configuration
- Maintain flexibility for future model changes
2025-11-25 09:11:45 +08:00
catlog22
7725e733b0 refactor: simplify iteration-state.json by removing redundant fields
Based on Gemini architectural analysis (verdict: "File necessary but simplify"):

Removed Redundant Fields:
- session_id → Derive from file path or workflow-session.json
- current_iteration → Calculate as iterations.length + 1
- max_iterations → Read from task.meta.max_iterations (single source)
- stuck_tests → Calculate by analyzing iterations[].failed_tests history
- regression_detected → Calculate from consecutive pass_rate values

Retained Essential Fields:
- current_task: Active task pointer (Resume critical)
- selected_strategy: Current iteration strategy (runtime state)
- next_action: State machine next step (Resume critical)
- iterations[]: Historical log (source of truth, cannot rebuild)

Enhanced iterations[] Array:
- Added failed_tests[] to each entry (was stuck_tests at top-level)
- Removed redundant regression_detected (calculated from pass_rate)

Benefits:
- Single source of truth (no data duplication)
- Less state to maintain and synchronize
- Clearer data ownership and calculation points
- Adheres to data normalization principles

Documentation Updates:
- Added "Purpose" and "Field Descriptions" sections
- Added "Removed Redundant Fields" with derivation logic
- Updated orchestrator responsibilities (Runtime Calculations)
- Updated agent template (Orchestrator-Calculated metadata)

Impact: File remains essential for Resume capability, but now leaner and normalized.
2025-11-25 09:08:41 +08:00
catlog22
2e8fe1e77a refactor: address Gemini review recommendations
Based on comprehensive Gemini analysis (Overall: Excellent), implemented 3 improvements:

1. Clarified CLI Fallback Triggers
   - Added 4 concrete trigger conditions (invalid output, low confidence, technical failures, quality degradation)
   - Defined confidence_score threshold: < 0.4
   - Specified fallback sequence with final degraded mode

2. Detailed Parallel Exploration Operations
   - Added "Operational Lifecycle" (7-step process: setup → execute → collect → select → apply → cleanup → commit)
   - Resource considerations: 3x CPU/memory, 10min timeout per branch
   - Error handling: worktree failure fallback, partial success handling

3. Explicit Commit Strategy
   - New "Commit Strategy" section with automatic commits at 3 checkpoints
   - After successful iteration (pass rate increased)
   - After parallel exploration (winning strategy)
   - Before rollback (regression detected)
   - Updated Best Practices #2: "Automatic Commits" (no manual intervention)

Changes:
- Lines: 515 → 596 (+81 for clarity, still -25% from original 791)
- Reduced ambiguity in critical automation points
- Enhanced operational robustness documentation

Gemini Assessment: "Exceptional technical documentation", "Robust design", "Clear and comprehensive"
2025-11-24 23:16:22 +08:00
catlog22
32c9595818 feat: add universal @test-fix-agent invocation template
Enhancement:
- Add dynamic prompt template for @test-fix-agent
- Supports 3 task types: test-gen, test-fix, test-fix-iteration
- Auto-adapts based on task.meta.type via configuration maps

Template Features:
- taskTypeObjective: Task-specific goals
- taskTypeSpecificReads: Required file reads per type
- taskTypeGuidance: Execution instructions per type
- taskTypeDeliverables: Expected outputs per type
- taskTypeSuccessCriteria: Completion validation per type

Benefits:
- Orchestrator uses single template for all task types
- Claude dynamically fills in type-specific details
- Reduces duplication, maintains consistency
- Clear guidance for criticality assessment (high/medium/low)
- Progressive testing integration (affected_only vs full_suite)

Lines: +86 (429 → 515, still -35% from original 791)
2025-11-24 23:09:24 +08:00
catlog22
bb427dc639 refactor: reorganize test-cycle-execute structure for clarity
Structure Changes:
- Quick Start → What & Why → How It Works → Enhanced Features → Reference
- User-facing content first, technical details later
- 540 → 429 lines (-21%, total -46% from original 791)

Improvements:
- Usage examples at top (immediate access)
- Simplified "How It Works" section (tree diagram)
- Agent roles as table (quick reference)
- Technical details moved to Reference section
- All core features preserved

Benefits:
- New users find usage commands immediately
- Conceptual understanding before technical details
- Reference section for implementation details
- Maintains all functionality and enhancements
2025-11-24 23:05:03 +08:00
catlog22
97b2247896 feat: enhance test-cycle-execute with intelligent iteration strategies
Optimizations:
- Reduced file size: 791 → 540 lines (-32%)
- Merged redundant sections (Overview + Philosophy + Responsibility Matrix)
- Simplified JSON examples and execution flow descriptions

Enhancements:
1. Intelligent Strategy Engine
   - 4 strategies: conservative/aggressive/exploratory/surgical
   - Auto-selection based on pass rate, stuck tests, regression

2. Progressive Testing
   - Run affected tests during iterations (70-90% faster)
   - Full suite on final validation

3. Parallel Strategy Exploration
   - Trigger on stuck tests (3+ consecutive failures)
   - Git worktree-based parallel execution
   - Select best result by pass rate

Changes:
- Max iterations: 5 → 10
- CLI tools: Gemini/Qwen → Gemini/Qwen/Codex (fallback chain)
- Add strategy metadata to iteration-state.json
- Add test_execution config to fix task JSON

Impact:
- Faster iterations via progressive testing
- Better stuck situation handling via parallel exploration
- Adaptive strategy selection for complex scenarios
2025-11-24 23:02:46 +08:00
catlog22
ed7dfad0a5 docs: update README files to version 5.9.3 2025-11-24 22:09:03 +08:00
catlog22
19acaea0f9 feat: add exploration and plan JSON schemas for task context and planning 2025-11-24 21:57:19 +08:00
catlog22
481a716c09 docs: update workflow initialization documentation and add project metadata schema 2025-11-24 21:46:44 +08:00
catlog22
07775cda30 fix: correct spelling of 'cli-execution-agent' in documentation 2025-11-24 21:46:08 +08:00
catlog22
3acf6fcba8 docs: enhance test task generation documentation with existing test infrastructure and framework usage 2025-11-24 21:14:32 +08:00
catlog22
f798dd4172 refactor: consolidate workflow commands and add UI design templates
1. Remove deprecated task-generate.md
   - Replaced by task-generate-agent.md in previous commits
   - Clean up duplicate command documentation

2. Update ui-design-agent.md
   - Refine agent specifications and workflow integration

3. Add UI design template files
   - Create ~/.claude/workflows/cli-templates/ui-design/systems/
   - Add animation-tokens.json for animation and transition patterns
   - Add design-tokens.json for color, typography, spacing tokens
   - Add layout-templates.json for structural layout patterns
   - Modular design system management

4. Update analyze_commands.py
   - Enhance command analysis capabilities
   - Improve metadata extraction

Key improvements:
- Remove duplicate/deprecated documentation
- Modular UI design template management
- Better workflow command organization
2025-11-24 19:36:33 +08:00
catlog22
aabc6294f4 refactor: optimize test workflow commands and extract templates
1. Optimize test-task-generate.md structure
   - Simplify from 417 lines to 217 lines (~48% reduction)
   - Reference task-generate-agent.md structure for consistency
   - Enhance agent prompt with clear specifications:
     * Explicit agent configuration reference
     * Detailed TEST_ANALYSIS_RESULTS.md integration mapping
     * Complete test-fix cycle configuration
     * Clear task structure requirements (IMPL-001 test-gen, IMPL-002+ test-fix)
   - Fix format errors (remove nested code blocks in agent prompt)
   - Emphasize "planning only" nature (does NOT execute tests)

2. Refactor test-concept-enhanced.md to use cli-execute-agent
   - Simplify from 463 lines to 142 lines (~69% reduction)
   - Change from direct Gemini execution to cli-execute-agent delegation
   - Extract Gemini prompt template to separate file:
     * Create ~/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt
     * Use $(cat ~/.claude/...) pattern for template reference
   - Clarify responsibility separation:
     * Command: Workflow coordination and validation
     * Agent: Execute Gemini analysis and generate outputs
   - Agent generates both gemini-test-analysis.md and TEST_ANALYSIS_RESULTS.md
   - Remove verbose embedded prompts and output format descriptions

Key improvements:
- Modular template management for easier maintenance
- Clear command vs agent responsibility separation
- Consistent documentation structure across workflow commands
- Enhanced agent prompts ensure correct output generation
- Use ~/.claude paths for installed workflow location
2025-11-24 19:33:02 +08:00
catlog22
adbb2070bb docs: update action-planning-agent and task-generate-agent documentation to clarify loading strategies and steps 2025-11-24 10:47:37 +08:00
catlog22
3c9cf3a677 docs: enhance action-planning-agent and task-generate-agent documentation with progressive loading strategy and smart artifact selection 2025-11-24 10:36:06 +08:00
catlog22
ff808ed539 docs: update task-generate-agent documentation for clarity on planning document generation and execution phases 2025-11-23 22:57:43 +08:00
catlog22
99a5c75b13 docs: enhance task generation agent documentation with progressive loading strategy and smart artifact selection 2025-11-23 22:44:11 +08:00
catlog22
7453987cfe Add documentation for new CLI commands: docs-related-cli and lite-fix
- Implemented the `docs-related-cli` command for context-aware documentation generation and update for changed modules using CLI execution with tool fallback.
- Introduced the `lite-fix` command for lightweight bug diagnosis and fix workflow, featuring intelligent severity assessment and optional hotfix mode for production incidents.
2025-11-23 22:18:39 +08:00
catlog22
4bb4bdc124 refactor: migrate agents to path-based context loading
- Update action-planning-agent and task-generate-agent to load context
  via file paths instead of embedded context packages
- Streamline test-cycle-execute workflow execution
- Remove redundant content from conflict-resolution and context-gather
- Update SKILL.md and tdd-plan documentation
2025-11-23 22:06:13 +08:00
catlog22
3915f7cb35 docs: update execute.md to clarify task loading and resume mode behavior 2025-11-23 21:18:30 +08:00
catlog22
657af628fd refactor: remove performance metrics and context management details from execute.md 2025-11-23 21:13:49 +08:00
catlog22
b649360cd6 docs: update agent documentation for context package and execution responsibilities 2025-11-23 21:04:25 +08:00
catlog22
20aa0f3a0b feat: add agent-task execution rules to ensure one agent per task JSON 2025-11-23 20:37:03 +08:00
catlog22
c8dd1adc69 docs: update WORKFLOW_DECISION_GUIDE with lite-fix workflow integration
- Add Bug Fix decision branch at workflow entry point (Q0)
- Integrate lite-fix workflow into decision flowchart
  - Standard bug fix path with adaptive severity assessment
  - Hotfix mode for production incidents
  - Diagnostic fallback for unclear root causes
- Add comprehensive lite-fix documentation:
  - 6-phase workflow explanation
  - Session artifacts structure
  - Risk scoring and workflow adaptation
  - Standard vs hotfix mode comparison
- Add two new scenarios:
  - Scenario D: Standard bug fix workflow
  - Scenario E: Production hotfix workflow
- Update quick reference tables:
  - Add bug fix commands by knowledge level
  - Add bug fix stage in project lifecycle
  - Add Lite-Fix workflow mode
- Update best practices and common pitfalls
- Update version to 5.9.2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 20:16:30 +08:00
catlog22
d53e7e18db docs: update README files to version 5.9.2 with lite-fix enhancements
- Add English README.md based on Chinese version
- Update version badges to v5.9.2 in both README files
- Add Lite-Fix workflow documentation and examples
- Document session artifact structure and management
- Include lite-fix quick start examples (standard and hotfix modes)
- Align with latest lite-fix session management features

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 20:11:48 +08:00
catlog22
0207677857 feat: enhance lite-fix workflow with session folder setup and artifact management 2025-11-23 20:05:34 +08:00
catlog22
72f27fb2f8 feat: add implementation_approach command field execution mode
- Add CLI mode example to implementation_approach showing optional command field
- Document two execution modes:
  1. Default Mode (agent execution): No command field, agent interprets steps
  2. CLI Mode (command execution): With command field, uses CLI tools (codex/gemini/qwen)

- Add Implementation Approach Execution Modes section with:
  - Mode descriptions and use cases
  - Required fields for each mode
  - Command patterns for CLI mode (codex, gemini)
  - Mode selection strategy

- Simplify implementation_approach examples to use generic placeholders
- Emphasize command field is optional, agent decides based on task complexity

Benefits:
- Clear documentation of both execution patterns
- Agents understand when to use CLI tools vs direct execution
- Pattern examples show structure without over-specifying content
- Supports both autonomous agent work and CLI tool delegation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:42:08 +08:00
catlog22
be129f5821 refactor: simplify pre_analysis JSON examples to show patterns only
- Simplify pre_analysis JSON examples to focus on structure patterns
- Replace specific commands with generic placeholders ([pattern], [lang], [N])
- Reduce OPTIONAL section to 5 key pattern examples (vs 12 detailed examples)
- Condense dynamic adaptation guide to essential principles
- Remove overly detailed command examples that could mislead

Benefits:
- Clearer focus on structure patterns rather than specific implementations
- Reduced cognitive load - easier to understand the schema
- Less risk of agents copying specific examples blindly
- More flexibility for agents to create task-appropriate steps

Pattern examples now show:
- Project structure analysis pattern
- Local search pattern (bash/rg/find)
- Gemini CLI pattern
- Qwen CLI pattern
- MCP tools pattern

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:39:34 +08:00
catlog22
b1bb74af0d feat: enhance pre_analysis with comprehensive CLI examples and dynamic guidance
- Add extensive pre_analysis examples organized by category:
  - Required context loading steps
  - Project structure analysis
  - Local codebase exploration (bash/rg/find)
  - Gemini CLI analysis (architecture, execution flow)
  - Qwen CLI analysis (code quality, fallback)
  - MCP tools integration
  - Tech-specific searches (React, database, etc.)

- Add "举一反三" (draw inferences) principle with detailed guidance:
  - Dynamic step selection based on task type
  - Tool selection strategy (Gemini/Qwen/Bash/MCP)
  - Task-specific adaptation examples (security, performance, API)
  - Command composition patterns

- Emphasize that examples are reference templates, not fixed requirements
- Agent must dynamically select and adapt steps based on actual task needs
- Provide clear guidelines for when to use each type of analysis tool

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:36:47 +08:00
catlog22
a7a654805c refactor: remove context_signature field from task JSON schema
- Remove context_signature field from meta object
- Simplify meta object to focus on essential fields
- Keep execution_group for parallelization support

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:33:29 +08:00
catlog22
c0c894ced1 feat: enhance action-planning-agent task JSON schema definition
- Add missing top-level field: context_package_path
- Add missing context fields: parent, inherited, shared_context
- Add meta fields for parallelization: execution_group, context_signature
- Fix status enumeration: pending|active|completed|blocked|container
- Fix meta.type enumeration: distinguish test-gen from test-fix
- Expand meta.agent options: add action-planning-agent, test-fix-agent, universal-executor
- Enhance artifacts structure: add source, usage, contains fields
- Restructure schema presentation into 4 clear sections
- Add practical pre_analysis examples with CLI bash search commands
- Emphasize quantification requirements for requirements/acceptance fields

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:24:46 +08:00
catlog22
7517f4f8ec docs: clarify manifest.json location in plan.md Phase 1
Add explicit note in Phase 1 validation to prevent main Claude from
incorrectly looking for manifest.json in .workflow/active/WFS-xxx/.

manifest.json only exists in .workflow/archives/ (for archived sessions).
Active sessions only have workflow-session.json (metadata).

This prevents confusion during plan execution before agent invocation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 13:44:02 +08:00
catlog22
0b45ff7345 docs: clarify optional historical archive analysis in context-search-agent
Add note in Phase 2 to clarify that historical archive analysis
(querying .workflow/archives/manifest.json) is optional, addressing
discrepancy between context-gather.md (4 tracks) and agent implementation
(3 tracks).

This prevents confusion about manifest.json location and makes the
optional nature of archive querying explicit.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 13:39:36 +08:00
catlog22
0416b23186 feat: add context-package.json sync to synthesis and design-sync workflows
Add Phase 6 to both synthesis.md and design-sync.md to automatically
update context-package.json when artifacts are modified, preventing
stale cache issues when transitioning to /workflow:plan.

Changes:
- synthesis.md: Add Phase 6 to sync updated role analyses to context-package
- design-sync.md: Add Phase 5 to sync design system refs + role analyses

This ensures:
- synthesis → plan: context-package reflects synthesis enhancements
- ui-design → plan: context-package includes design system references
- No manual context-gather re-run needed after artifact updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 12:53:08 +08:00
catlog22
948cf3fcd7 fix: prevent unwanted auto-commits during CLI tool execution 2025-11-23 12:29:44 +08:00
catlog22
4272ca9ebd Add CLI commands for full and related documentation generation
- Implemented `/memory:docs-full-cli` for comprehensive project documentation generation using CLI execution with batched agents and tool fallback.
- Introduced `/memory:docs-related-cli` to generate/update documentation for git-changed modules, optimizing for efficiency with direct parallel execution for fewer modules and agent batch processing for larger sets.
- Defined execution flows, strategies, and error handling for both commands, ensuring robust documentation processes.
2025-11-23 11:27:23 +08:00
catlog22
73fed4893b docs: Generate ARCHITECTURE.md and EXAMPLES.md
Generated system design and usage examples documentation based on project
context and provided templates.

ARCHITECTURE.md provides an overview of the system's architecture,
including core principles, structure, module map, interactions, design patterns,
API overview, data flow, security, and scalability.

EXAMPLES.md offers end-to-end usage examples, covering quick start, core use cases,
advanced scenarios, testing examples, and best practices.
2025-11-23 11:23:21 +08:00
catlog22
f09c6e2a7a docs: Generate comprehensive project overview README.md 2025-11-23 11:20:35 +08:00
catlog22
65a204a563 fix: enforce synchronous bash execution in memory update workflows
Explicitly set run_in_background: false for all Bash commands in update-full and update-related workflows to prevent unwanted background execution. This ensures synchronous execution without requiring BashOutput polling.

Changes:
- Phase 1-4: Add run_in_background: false to all Bash calls
- Simplify code examples and remove redundant explanations
- Update both direct execution and agent batch execution patterns

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 10:23:30 +08:00
catlog22
ffbc440a7e feat: optimize file tracking in installation process with bulk operations 2025-11-23 09:50:51 +08:00
catlog22
3c28c61bea fix: update minimal documentation output guideline for clarity 2025-11-22 23:21:26 +08:00
catlog22
b0b99a4217 Enhance installation and uninstallation processes
- Added optional quiet mode for backup notifications to reduce output clutter.
- Improved file merging with progress reporting and summary of backed up files.
- Implemented a cleanup function to move old installations to a backup directory before new installations.
- Enhanced manifest handling to distinguish between Global and Path installations.
- Updated uninstallation process to preserve global files if a Global installation exists.
- Improved error handling and user feedback during file operations.
2025-11-22 23:20:39 +08:00
catlog22
4f533f6fd5 feat(lite-execute): intelligent task grouping with parallel/sequential execution
Major improvements:
- Implement dependency-aware task grouping algorithm
  * Same file modifications → sequential batch
  * Different files + no dependencies → parallel batch
  * Keyword-based dependency inference (use/integrate/call/import)
  * Batch limits: Agent 7 tasks, CLI 4 tasks

- Add parallel execution strategy
  * All parallel batches launch concurrently (single Claude message)
  * Sequential batches execute in order
  * No concurrency limit for CLI tools
  * Execution flow: parallel-first → sequential-after

- Enhance code review with task.json acceptance criteria
  * Unified review template for all tools (Gemini/Qwen/Codex/Agent)
  * task.json in CONTEXT field for CLI tools
  * Explicit acceptance criteria verification

- Clarify execution requirements
  * Remove ambiguous strategy instructions
  * Add explicit "MUST complete ALL tasks" requirement
  * Prevent CLI tools from partial execution misunderstanding

- Simplify documentation (~260 lines reduced)
  * Remove redundant examples and explanations
  * Keep core algorithm logic with inline comments
  * Eliminate duplicate descriptions across sections

Breaking changes: None (backward compatible)
2025-11-22 21:05:43 +08:00
catlog22
530c348e95 feat: enhance task execution with intelligent grouping and dependency analysis 2025-11-22 20:57:16 +08:00
catlog22
a98b26b111 feat: add session folder structure for lite-plan artifacts
- Create dedicated session folder (.workflow/.lite-plan/{task-slug}-{timestamp}/)
  for each lite-plan execution to organize all planning artifacts
- Always export task.json (removed optional export question from Phase 4)
- Save exploration.json, plan.json, and task.json to session folder
- Add session artifact paths to executionContext for lite-execute delegation
- Update lite-execute to use artifact file paths for CLI/agent context
- Enable CLI tools (Gemini/Qwen/Codex) and agents to access detailed
  planning context via file references

Benefits:
- Clean separation between different task executions
- All artifacts automatically saved for reusability
- Enhanced context available for execution phase
- Natural audit trail of planning sessions
2025-11-22 20:32:01 +08:00
catlog22
9f7e33cbde Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2025-11-22 20:22:21 +08:00
catlog22
a25464ce28 Merge pull request #29 from catlog22/claude/analyze-workflow-logic-015GvXNP62281T3ogUSaJdP4
Analyze workflow execution logic and document findings
2025-11-20 20:16:28 +08:00
catlog22
0a3f2a5b03 Merge pull request #28 from catlog22/claude/check-active-workflow-files-01S7quRK9xHWStgpQ9WeTnF2
Check for .active identifier in workflow files
2025-11-20 20:15:39 +08:00
Claude
1929b7f72d docs: remove obsolete .active marker file references
Remove outdated references to .active-session marker files that are no longer used in the workflow implementation. The system now uses directory-based session management where active sessions are identified by their location in .workflow/active/ directory.

Changes:
- WORKFLOW_DIAGRAMS.md: Replace .active-session marker with actual directory structure
- COMMAND_SPEC.md: Update session:complete description to reflect directory-based archival

The .archiving marker is still valid and used for transactional session completion.
2025-11-20 12:13:45 +00:00
Claude
b8889d99c9 refactor: simplify session selection logic expression
- Condense Case A/B/C headers for clarity
- Merge bash if-else into single line using && ||
- Combine steps 1-4 in Case C into compact flow
- Remove redundant explanations while keeping key info
- Reduce from 64 lines to 39 lines (39% reduction)
2025-11-20 12:12:56 +00:00
Claude
a79a3221ce fix: enhance workflow execute session selection with user interaction
- Add detailed session discovery logic with 3 cases (none, single, multiple)
- Implement AskUserQuestion for multiple active sessions
- Display rich session metadata (project name, task progress, completion %)
- Support flexible user input (session number, full ID, or partial ID)
- Maintain backward compatibility for single-session scenarios
- Improve user experience with clear confirmation messages

This minimal change addresses session conflict issues without complex
locking mechanisms, focusing on explicit user choice when ambiguity exists.
2025-11-20 12:08:35 +00:00
catlog22
67c18d1b03 Merge pull request #27 from catlog22/claude/cleanup-root-docs-01SAjhmQa3Wc4EWxZoCnFb77
Remove unnecessary documentation from root directory
2025-11-20 19:55:15 +08:00
Claude
2301f263cd docs: cleanup unnecessary root directory documentation
Remove 7 unnecessary documentation files from root directory:
- COMMAND_DOCS_AUDIT_REPORT.md (temporary audit report)
- PLANNING_GAP_ANALYSIS.md (temporary analysis document)
- PROJECT_INTRODUCTION.md (duplicate of README)
- COMMAND_FLOW_STANDARD.md (internal standard)
- COMMAND_TEMPLATE_EXECUTOR.md (internal design)
- COMMAND_TEMPLATE_ORCHESTRATOR.md (internal design)
- LITE_FIX_DESIGN.md (internal design)

Retained essential documentation:
- User guides (README, GETTING_STARTED, FAQ, EXAMPLES)
- Developer docs (CLAUDE.md, CONTRIBUTING, ARCHITECTURE)
- Command references (COMMAND_REFERENCE, COMMAND_SPEC)
- Workflow guides (WORKFLOW_DECISION_GUIDE, WORKFLOW_DIAGRAMS)
2025-11-20 11:53:40 +00:00
catlog22
8d828e8762 Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2025-11-20 19:44:31 +08:00
catlog22
b573450821 Merge pull request #26 from catlog22/claude/fix-ui-workflow-docs-01BxfT5RLJ8Txc5N8oToBiYn
Remove unsupported URL input from UI workflow docs
2025-11-20 19:39:14 +08:00
Claude
229a9867e6 docs: remove URL support from UI workflow commands
Removed all URL-related parameters and functionality from UI design commands
as they are no longer supported. All commands now only accept local files.

Changes:
- style-extract.md: Removed --urls parameter and all URL mode logic
- layout-extract.md: Removed --urls parameter and DOM extraction via URLs
- COMMAND_SPEC.md: Deleted capture and explore-layers commands, updated syntax

Affected commands:
- /workflow:ui-design:style-extract: Only accepts --images and --prompt
- /workflow:ui-design:layout-extract: Only accepts --images and --prompt
- Removed: /workflow:ui-design:capture (command deleted)
- Removed: /workflow:ui-design:explore-layers (command deleted)

All UI workflow commands now require manual input of local resources
(images, code files, HTML, CSS, JS) instead of fetching from URLs.
2025-11-20 11:35:00 +00:00
Claude
6fe31cc408 docs: fix UI workflow documentation - remove outdated URL support
The /workflow:ui-design:imitate-auto command no longer supports URL input.
Updated all documentation to reflect that it now only accepts:
- Local image files (glob patterns)
- Local code files/directories
- Text prompts

Changes:
- COMMAND_SPEC.md: Updated syntax and examples
- WORKFLOW_DECISION_GUIDE.md/.._EN.md: Replaced URL examples with local file examples
- EXAMPLES.md: Updated design system creation example
- GETTING_STARTED.md/.._CN.md: Fixed command descriptions
- ui-design-workflow-guide.md: Updated multiple sections and examples

Note: layout-extract still supports --urls parameter (not changed)
2025-11-20 11:25:21 +00:00
catlog22
196951ff4f Merge pull request #19 from catlog22/claude/analyze-planning-phase-01LgSNX3QxNDKmaUGpwn11gc
Analyze planning phase for overlooked scenarios
2025-11-20 19:07:20 +08:00
Claude
61c08e1585 docs: update LITE_FIX_DESIGN.md to v2.0 simplified design
Complete rewrite reflecting simplified architecture:

Version Change: 1.0.0 → 2.0.0 (Simplified Design)

Major Updates:
1. Mode Simplification (3 → 2)
   - Removed: Regular, Critical, Hotfix
   - Now: Default (auto-adaptive), Hotfix
   - Added: Intelligent self-adaptation mechanism

2. Parameter Reduction (3 → 1)
   - Removed: --critical, --incident
   - Kept: --hotfix only
   - Simplified: 67% fewer parameters

3. New Core Innovation: Intelligent Self-Adaptation
   - Phase 2 auto-calculates risk score (0-10)
   - Workflow adapts automatically (diagnosis depth, test strategy, review)
   - 4 risk levels: <3.0 (Low), 3.0-5.0 (Medium), 5.0-8.0 (High), ≥8.0 (Critical)

4. Updated All Sections:
   - Design comparison with lite-plan
   - Command syntax before/after
   - Intelligent adaptive workflow details
   - Phase-by-phase adaptation logic
   - Data structure extensions (confidence_level, workflow_adaptation)
   - Implementation roadmap updates
   - Success metrics (mode selection accuracy now 100%)
   - User experience flow comparison

5. New ADRs (Architecture Decision Records):
   - ADR-001: Why remove Critical mode?
   - ADR-002: Why keep Hotfix as separate mode?
   - ADR-003: Why adaptive confirmation dimensions?
   - ADR-004: Why remove --incident parameter?

6. Risk Assessment:
   - Auto-severity detection errors (mitigation: transparent scoring)
   - Users miss --hotfix flag (mitigation: keyword detection)
   - Adaptive workflow confusion (mitigation: clear explanations)

Key Philosophy Shift:
- v1.0: "Provide multiple modes for different scenarios"
- v2.0: "Intelligent single mode that adapts to reality"

Document Status: Design Complete, Development Pending
2025-11-20 11:02:32 +00:00
catlog22
07caf20e0d Merge branch 'main' of https://github.com/catlog22/Claude-Code-Workflow 2025-11-20 18:51:24 +08:00
Claude
1e9ca574ed refactor: simplify lite-fix command modes and parameters
Reduced complexity from 3 modes to 2 modes with intelligent adaptation:

Before (complex):
- 3 modes: Regular, Critical, Hotfix
- 3 parameters: --critical, --hotfix, --incident

After (simplified):
- 2 modes: Default (auto-adaptive), Hotfix
- 1 parameter: --hotfix

Key improvements:
- Default mode intelligently adapts based on risk score (Phase 2)
- Automatic workflow adjustment (diagnosis depth, test strategy, review)
- Risk score thresholds determine process complexity automatically
- Removed manual Critical mode selection (now auto-detected)
- Removed --incident parameter (can include in bug description)

Adaptive behavior:
- risk_score <3.0: Full test suite, comprehensive diagnosis
- 3.0-5.0: Focused integration tests, moderate diagnosis
- 5.0-8.0: Smoke+critical tests, focused diagnosis
- ≥8.0: Smoke tests only, minimal diagnosis

Line count: 652 lines (reduced from 707)
Matches lite-plan simplicity while maintaining full functionality
2025-11-20 10:44:20 +00:00
catlog22
d0ceb835b5 Merge pull request #25 from catlog22/claude/add-document-analysis-template-01T8qhUKLCGSev5RunZyxBwp
Add document analysis prompt template
2025-11-20 18:43:05 +08:00
catlog22
fad32d7caf Merge pull request #24 from catlog22/claude/optimize-cli-prompts-01QJm4wjGas8z5BEF5zGTM7H
Optimize CLI prompt templates for clarity
2025-11-20 18:42:27 +08:00
catlog22
806b782b03 Merge pull request #23 from catlog22/claude/workflow-status-dashboard-01MWTxt5mbpC4G8ADPCLHZ73
Add workflow status dashboard with task board
2025-11-20 18:34:55 +08:00
Claude
a62bbd6a7f refactor: simplify document analysis template and update strategy guide
Changes:
- Simplify 02-analyze-technical-document.txt to match other template formats
- Reduce from 280 lines to 33 lines with concise checklist structure
- Update intelligent-tools-strategy.md to include document analysis
- Add document-analysis to Quick Decision Matrix and Task-Template Matrix

Template now follows standard format:
- Brief description + CORE CHECKLIST + REQUIRED ANALYSIS
- OUTPUT REQUIREMENTS + VERIFICATION CHECKLIST + Focus statement
- Maintains all key requirements: pre-planning, evidence-based, self-critique
2025-11-20 10:34:36 +00:00
catlog22
2a7d55264d Merge pull request #22 from catlog22/claude/update-readme-workflow-guide-01AgqTs4ZTPmJqJHJRkzrYzZ
Update English README with workflow guide
2025-11-20 18:33:57 +08:00
Claude
837bee79c7 feat: add document analysis template for technical documents and papers
Add new CLI mode for systematic technical document analysis with:
- CLI command: /cli:mode:document-analysis for Gemini/Qwen/Codex
- Comprehensive analysis template with 6-phase protocol
- Support for README, API docs, research papers, specifications, tutorials
- Evidence-based analysis with pre-planning and self-critique requirements
- Precise language constraints and structured output format

Template features:
- Pre-analysis planning phase for approach definition
- Multi-phase analysis: assessment, extraction, critical analysis, synthesis
- Self-critique requirement before final output
- Mandatory section references and evidence citations
- Output length control proportional to document size
2025-11-20 10:05:09 +00:00
Claude
d8ead86b67 refactor: optimize CLI prompt templates for clarity and directness
Optimized 7 key CLI prompt templates following best practices:

Key improvements:
- Prioritize critical instructions at the top (role, constraints, output format)
- Replace verbose/persuasive language with direct, precise wording
- Add explicit planning requirements before final output
- Remove emojis and unnecessary adjectives
- Simplify section headers and structure
- Convert verbose checklists to concise bullet points
- Add self-review checklists for quality control

Files optimized:
- analysis/01-diagnose-bug-root-cause.txt: Simplified persona, added planning steps
- analysis/02-analyze-code-patterns.txt: Removed emojis, added planning requirements
- planning/01-plan-architecture-design.txt: Streamlined capabilities, direct language
- documentation/module-readme.txt: Concise structure, planning requirements
- development/02-implement-feature.txt: Clear planning phase, simplified checklist
- development/02-generate-tests.txt: Direct requirements, focused verification
- planning-roles/product-owner.md: Simplified role definition, added planning process

Benefits:
- Clearer expectations for model output
- Reduced token usage through conciseness
- Better focus on critical instructions
- Consistent structure across templates
- Explicit planning/self-critique requirements
2025-11-20 10:03:57 +00:00
Claude
8c2a7b6983 docs: update README to reference English workflow decision guide
Updated the English README.md to reference WORKFLOW_DECISION_GUIDE_EN.md
instead of WORKFLOW_DECISION_GUIDE.md for proper language consistency.
2025-11-20 10:00:09 +00:00
catlog22
f5ca033ee8 Merge pull request #20 from catlog22/claude/add-cli-workflow-guide-01XnbftHLPsFZwGDFdXSteRN
Add CLI usage steps to workflow guide
2025-11-20 17:58:02 +08:00
Claude
842ed624e8 fix: use ~/.claude path format for template reference
Update template path from .claude/templates to ~/.claude/templates
to follow project convention for path references.
2025-11-20 09:54:41 +00:00
Claude
c34a6042c0 docs: add CLI results as memory/context section
Add comprehensive explanation of how CLI tool results can be saved and
reused as context for subsequent operations:
- Result persistence in workflow sessions (.chat/ directory)
- Using analysis results as planning basis
- Using analysis results as implementation basis
- Cross-session references
- Memory update loops with iterative optimization
- Visual memory flow diagram showing phase-to-phase context passing
- Best practices for maintaining continuity and quality

This enables intelligent workflows where Gemini/Qwen analysis informs
Codex implementation, and all results accumulate as project memory for
future decision-making. Integrates with /workflow:plan and
/workflow:lite-plan commands.
2025-11-20 09:53:21 +00:00
Claude
383da9ebb7 docs: add CLI tools collaboration mode to Workflow Decision Guide
Add comprehensive section on multi-model CLI collaboration (Gemini/Qwen/Codex):
- Three execution modes: serial, parallel, and hybrid
- Semantic invocation vs command invocation patterns
- Integration examples with Lite and Full workflows
- Best practices for tool selection and execution strategies

Updates both Chinese and English versions with practical examples showing
how to leverage ultra-long context models (Gemini/Qwen) for analysis and
Codex for precise code implementation.
2025-11-20 09:51:50 +00:00
Claude
4693527a8e feat: add HTML dashboard generation to workflow status command
Add --dashboard parameter to /workflow:status command that generates
an interactive HTML task board displaying active and archived sessions.

Features:
- Responsive layout with modern CSS design
- Real-time statistics for sessions and tasks
- Task cards with status indicators (pending/in_progress/completed)
- Progress bars for each session
- Search and filter functionality
- Dark/light theme toggle
- Separate panels for active and archived sessions

Implementation:
- Added Dashboard Mode section to .claude/commands/workflow/status.md
- Created HTML template at .claude/templates/workflow-dashboard.html
- Template uses data injection pattern with {{WORKFLOW_DATA}} placeholder
- Generated dashboard saved to .workflow/dashboard.html

Usage:
  /workflow:status --dashboard

The dashboard provides a visual overview of all workflow sessions
and their tasks, making it easier to track project progress.
2025-11-20 09:49:54 +00:00
Claude
5f0dab409b refactor: convert lite-fix.md to full English
Changed all Chinese text to English for consistency:
- Table headers: "适用场景" → "Use Case", "流程特点" → "Workflow Characteristics"
- Example comments: Chinese descriptions → English descriptions
- All mixed language content now fully in English

Maintains same structure and functionality (707 lines).
2025-11-20 09:49:05 +00:00
Claude
c679253c30 refactor: streamline lite-fix.md to match lite-plan's concise style (707 lines)
Reduced from 1700+ lines to 707 lines while preserving core functionality:

Preserved:
- Complete 6-phase execution flow
- Three severity modes (Regular/Critical/Hotfix)
- Data structure definitions
- Best practices and quality gates
- Related commands and comparisons

Removed/Condensed:
- Redundant examples (kept 3 essential ones)
- Verbose implementation details
- Duplicate explanations
- Extended discussion sections

Format matches lite-plan.md (667 lines) for consistency.
Detailed design rationale remains in LITE_FIX_DESIGN.md.
2025-11-20 09:41:32 +00:00
catlog22
fc965c87d7 Merge pull request #17 from catlog22/claude/optimize-doc-phase2-filename-012ABaeYT56XeMJ73zUeA3kt
Optimize JSON filename in doc command phase2
2025-11-20 17:40:30 +08:00
catlog22
50a36ded97 Merge pull request #18 from catlog22/claude/add-english-workflow-guide-01EfMQYn5ZBavQWNB5PgSN85
Add English version of Workflow Decision Guide
2025-11-20 17:40:11 +08:00
Claude
c5a0f635f4 docs: add English version of Workflow Decision Guide
Add WORKFLOW_DECISION_GUIDE_EN.md with complete English translation of the workflow decision guide, including:
- Full lifecycle command selection flowchart
- Decision point explanations with examples
- Testing and review strategies
- Complete flows for typical scenarios
- Quick reference tables by knowledge level, project phase, and work mode
- Best practices and common pitfalls
2025-11-20 09:35:45 +00:00
Claude
ca9653c2e6 refactor: rename phase2-analysis.json to doc-planning-data.json
Optimize the Phase 2 output filename in /memory:docs command for better clarity:
- Old: phase2-analysis.json (generic, non-descriptive)
- New: doc-planning-data.json (clear purpose, self-documenting)

The new name better reflects that this file contains comprehensive
documentation planning data including folder analysis, grouping
information, existing docs, and statistics.

Updated all references in command documentation and skill guides.
2025-11-20 09:22:32 +00:00
Claude
38f2355573 feat: add lite-fix command design for bug diagnosis and emergency fixes
Introduces /workflow:lite-fix - a lightweight bug fixing workflow optimized
for rapid diagnosis, targeted fixes, and streamlined verification.

Command Design:
- Three severity modes: Regular (2-4h), Critical (30-60min), Hotfix (15-30min)
- Six-phase execution: Diagnosis → Impact → Planning → Verification → Confirmation → Execution
- Intelligent code search: cli-explore-agent (regular) → direct search (critical) → minimal (hotfix)
- Risk-aware verification: Full test suite → Focused tests → Smoke tests

Key Features:
- Structured root cause analysis (file:line, reproduction steps, blame info)
- Quantitative impact assessment (risk score 0-10, user/business impact)
- Multi-strategy fix planning (immediate patch vs comprehensive refactor)
- Adaptive branch strategy (feature branch vs hotfix branch from production tag)
- Automatic follow-up task generation for hotfixes (tech debt management)
- Real-time deployment monitoring with auto-rollback triggers

Integration:
- Complements /workflow:lite-plan (fix vs feature development)
- Reuses /workflow:lite-execute for execution layer
- Integrates with /cli:mode:bug-diagnosis for preliminary analysis
- Escalation path to /workflow:plan for complex refactors

Design Documents:
- .claude/commands/workflow/lite-fix.md - Complete command specification
- LITE_FIX_DESIGN.md - Architecture design and decision records

Addresses: PLANNING_GAP_ANALYSIS.md Scenario #8 (Emergency Fix)

Expected Impact:
- Reduce bug fix time by 50-70%
- Improve diagnosis accuracy to 85%+
- Reduce production hotfix risks
- Systematize technical debt from quick fixes
2025-11-20 09:21:26 +00:00
Claude
2fb1015038 docs: add comprehensive planning gap analysis for 15 software development scenarios
Analysis identifies critical gaps in current planning workflows:

High Priority Gaps:
- Legacy code refactoring (no test coverage safety nets)
- Emergency hotfix workflows (production incidents)
- Data migration planning (rollback and validation)
- Dependency upgrade management (breaking changes)

Medium Priority Gaps:
- Incremental rollout with feature flags
- Multi-team coordination and API contracts
- Tech debt systematic management
- Performance optimization with profiling

Analysis includes:
- 15 detailed scenario analyses with gap identification
- Enhanced Task JSON schema extension proposals
- Implementation roadmap (4 phases)
- Priority recommendations based on real-world impact

Impact: Extends planning coverage from ~40% to ~90% of software development scenarios
2025-11-20 09:08:27 +00:00
catlog22
d7bee9bdf2 docs: clarify path parameter description in /memory:docs command
Improve the path parameter documentation to eliminate ambiguity:
- Change "Target directory" to "Source directory to analyze"
- Explicitly state documentation is generated in .workflow/docs/{project_name}/ at workspace root
- Emphasize docs are NOT created within the source path itself
- Add concrete example showing path mirroring behavior

This resolves potential confusion about where documentation files are created.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 15:48:06 +08:00
catlog22
751d251433 Merge pull request #16 from catlog22/claude/fix-lexical-error-01QGNCxKABnMVrn1PSTCMLCW
Fix lexical error in rich display rendering
2025-11-20 13:58:18 +08:00
Claude
51b1eb5da6 fix: correct Mermaid parallelogram syntax for command nodes
Fixed lexical error in Mermaid diagram where nodes starting with
[/workflow: were not properly closed. Changed to use correct
parallelogram syntax [/ text /] to resolve "Unrecognized text" error.

Affected nodes:
- BrainIdea, BrainDesign (brainstorm commands)
- UIImitate, UIExplore, UISync (UI design commands)
- LitePlanE, LitePlanNormal, LiteAgent (lite workflow commands)
- Verify, Execute variants (verification/execution commands)
- TDD, TestGen, TestCycle (testing commands)
- SecurityReview, ArchReview, QualityReview, GeneralReview (review commands)
2025-11-20 05:45:41 +00:00
catlog22
275ed051c6 Merge pull request #15 from catlog22/claude/add-project-documentation-01KoecebaGvjvFiUYgAWyL6F
fix: remove quotes from Mermaid node labels to resolve rendering error
2025-11-20 13:32:26 +08:00
catlog22
5e69748016 Merge pull request #14 from catlog22/claude/add-project-documentation-01KoecebaGvjvFiUYgAWyL6F
fix: replace <br/> with <br> for GitHub Mermaid compatibility
2025-11-20 13:22:49 +08:00
catlog22
8ae3da8f61 Merge pull request #13 from catlog22/claude/add-project-documentation-01KoecebaGvjvFiUYgAWyL6F
docs: clarify brainstorm vs plan workflow and add decision guide
2025-11-20 13:19:03 +08:00
catlog22
758321b829 Merge pull request #12 from catlog22/claude/add-project-documentation-01KoecebaGvjvFiUYgAWyL6F
docs: add comprehensive project documentation
2025-11-20 13:08:54 +08:00
2468 changed files with 778521 additions and 80598 deletions

View File

@@ -0,0 +1,25 @@
# 中文回复准则
## 核心原则
- 所有回复使用简体中文
- 技术术语保留英文,首次出现可添加中文解释
- 代码变量名保持英文,注释使用中文
## 格式规范
- 中英文/数字间加空格:`使用 TypeScript 开发``共 3 个文件`
- 使用中文标点:,。!?:;
- 代码/命令用反引号:`npm install`
## Git Commit
- 使用中文提交信息
- 格式:`类型: 简短描述`
- 类型feat/fix/refactor/docs/test/chore
## 保持英文
- 代码文件内容
- 错误信息和日志
- 文件路径和命令

View File

@@ -0,0 +1,75 @@
{
"_template_description": "Template for fix planning output. Planning agent reads this template and generates actual fix-plan.json",
"_usage": "Planning agent should follow this structure when analyzing findings and creating fix plan",
"plan_id": "<string: plan-{timestamp}>",
"created_at": "<string: ISO8601 timestamp>",
"total_findings": "<number: total findings to fix>",
"execution_strategy": {
"approach": "<string: hybrid|parallel|serial>",
"parallel_limit": "<number: max concurrent agents, default 3>",
"total_stages": "<number: how many stages in timeline>",
"rationale": "<string: explain why this strategy was chosen>"
},
"groups": [
{
"group_id": "<string: unique group identifier like G1, G2, ...>",
"group_name": "<string: descriptive name for this group>",
"findings": ["<array of finding IDs>"],
"fix_strategy": {
"approach": "<string: high-level fix approach>",
"rationale": "<string: why these findings were grouped together>",
"complexity": "<string: low|medium|high>",
"estimated_duration_minutes": "<number: estimated time>",
"test_pattern": "<string: test file glob pattern like tests/auth/**/*.test.*>",
"rollback_plan": "<string: what to do if fix fails>"
},
"risk_assessment": {
"level": "<string: low|medium|high|critical>",
"concerns": ["<array of strings: potential risks>"],
"mitigation": "<string: how to mitigate risks>"
}
}
],
"timeline": [
{
"stage": "<number: stage number 1-indexed>",
"groups": ["<array of group IDs to execute in this stage>"],
"execution_mode": "<string: parallel|serial>",
"depends_on": ["<optional: array of group IDs this stage depends on>"],
"rationale": "<string: why these groups are in this stage with this mode>"
}
],
"_instructions": {
"grouping_principles": [
"Group findings in the same file with same dimension",
"Group findings with similar root causes (high semantic similarity)",
"Consider file dependencies and execution order",
"Balance group sizes for efficient parallel execution"
],
"execution_strategy_guidelines": [
"Use parallel for independent groups in different files",
"Use serial for dependent changes (e.g., shared utilities)",
"Limit parallelism to 3 concurrent agents to avoid resource contention",
"High-risk groups should be isolated for careful monitoring"
],
"test_strategy_guidelines": [
"Identify test files related to changed code",
"Use specific patterns for faster test execution",
"Ensure test coverage captures all fix impacts",
"Define clear pass criteria (usually 100% pass rate)"
],
"risk_assessment_guidelines": [
"Low: Simple fixes with comprehensive test coverage",
"Medium: Moderate changes affecting multiple components",
"High: Core logic changes or security-critical fixes",
"Critical: Database schema changes or breaking API changes"
]
}
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "fix-progress-template.json",
"$comment": "Template for fix-progress-{N}.json - one per group, initialized by planning agent, updated by execution agent",
"progress_id": "fix-progress-N",
"group_id": "GN",
"group_name": "Group name from fix plan",
"status": "pending",
"phase": "waiting",
"assigned_agent": null,
"started_at": null,
"last_update": "ISO 8601 timestamp",
"findings": [
{
"finding_id": "finding-uuid",
"finding_title": "Finding title from review",
"file": "path/to/file.ts",
"line": 0,
"status": "pending",
"result": null,
"attempts": 0,
"started_at": null,
"completed_at": null,
"commit_hash": null,
"test_passed": null
}
],
"summary": {
"total_findings": 0,
"pending": 0,
"in_progress": 0,
"fixed": 0,
"failed": 0,
"percent_complete": 0.0
},
"current_finding": null,
"flow_control": {
"implementation_approach": [],
"current_step": null
},
"errors": []
}

View File

@@ -0,0 +1,261 @@
---
name: product-owner
description: Product backlog management, user story creation, and feature prioritization
---
# Product Owner Planning Template
## Role & Scope
**Role**: Product Owner
**Focus**: Product backlog management, user story definition, stakeholder alignment, value delivery
**Excluded**: Team management, technical implementation, detailed system design
## Planning Process (Required)
Before providing planning document, you MUST:
1. Analyze product vision and stakeholder needs
2. Define backlog structure and prioritization framework
3. Create user stories with acceptance criteria
4. Plan releases and define success metrics
5. Present structured planning document
## Planning Document Structure
### 1. Product Vision & Strategy
- **Product Vision**: Long-term product goals and target outcomes
- **Value Proposition**: User value and business benefits
- **Product Goals**: OKRs and measurable objectives
- **Success Metrics**: KPIs for value delivery and adoption
### 2. Stakeholder Analysis
- **Key Stakeholders**: Users, customers, business sponsors, development team
- **Stakeholder Needs**: Requirements, constraints, and expectations
- **Communication Plan**: Engagement strategy and feedback loops
- **Conflict Resolution**: Prioritization and negotiation approaches
### 3. Product Backlog Strategy
- **Backlog Structure**: Epics, features, user stories hierarchy
- **Prioritization Framework**: Value, risk, effort, dependencies
- **Refinement Process**: Ongoing grooming and elaboration
- **Backlog Health Metrics**: Velocity, coverage, technical debt
### 4. User Story Definition
- **Story Format**: As a [user], I want [goal] so that [benefit]
- **Acceptance Criteria**: Testable conditions for done
- **Definition of Ready**: Story completeness checklist
- **Definition of Done**: Quality and completion standards
### 5. Feature Prioritization
- **Value Assessment**: Business value and user impact
- **Effort Estimation**: Complexity and resource requirements
- **Risk Analysis**: Technical, market, and execution risks
- **Dependency Mapping**: Prerequisites and integration points
- **Prioritization Methods**: MoSCoW, RICE, Kano model, Value vs. Effort
### 6. Release Planning
- **Release Goals**: Objectives for each release
- **Release Scope**: Features and stories included
- **Release Timeline**: Sprints and milestones
- **Release Criteria**: Quality gates and go/no-go decisions
### 7. Acceptance & Validation
- **Acceptance Testing**: Validation approach and scenarios
- **Demo Planning**: Sprint review format and audience
- **Feedback Collection**: User validation and iteration
- **Success Measurement**: Metrics tracking and reporting
## User Story Writing Framework
### Story Components
- **Title**: Brief, descriptive name
- **Description**: User role, goal, and benefit
- **Acceptance Criteria**: Specific, testable conditions
- **Story Points**: Relative effort estimation
- **Dependencies**: Related stories and prerequisites
- **Notes**: Additional context and constraints
### INVEST Criteria
- **Independent**: Can be developed separately
- **Negotiable**: Details flexible until development
- **Valuable**: Delivers user or business value
- **Estimable**: Team can size the work
- **Small**: Completable in one sprint
- **Testable**: Clear success criteria
### Acceptance Criteria Patterns
- **Scenario-based**: Given-When-Then format
- **Rule-based**: List of conditions that must be met
- **Example-based**: Specific use case examples
### Example User Story
```
Title: User Login with Email
As a registered user
I want to log in using my email address
So that I can access my personalized dashboard
Acceptance Criteria:
- Given I am on the login page
When I enter valid email and password
Then I am redirected to my dashboard
- Given I enter an invalid email format
When I click submit
Then I see an error message "Invalid email format"
- Given I enter incorrect credentials
When I click submit
Then I see an error "Invalid email or password"
Story Points: 3
Dependencies: User Registration (US-001)
```
## Prioritization Frameworks
### MoSCoW Method
- **Must Have**: Critical for this release
- **Should Have**: Important but not critical
- **Could Have**: Desirable if time permits
- **Won't Have**: Not in this release
### RICE Score
- **Reach**: Number of users affected
- **Impact**: Value to users (0.25, 0.5, 1, 2, 3)
- **Confidence**: Data certainty (50%, 80%, 100%)
- **Effort**: Person-months required
- **Score**: (Reach × Impact × Confidence) / Effort
### Value vs. Effort Matrix
- **Quick Wins**: High value, low effort (do first)
- **Major Projects**: High value, high effort (plan carefully)
- **Fill-ins**: Low value, low effort (do if time)
- **Time Sinks**: Low value, high effort (avoid)
### Kano Model
- **Delighters**: Unexpected features that delight
- **Performance**: More is better
- **Basic**: Expected features (absence causes dissatisfaction)
## Backlog Management Practices
### Backlog Refinement
- Regular grooming sessions (weekly recommended)
- Story elaboration and acceptance criteria definition
- Estimation and story splitting
- Dependency identification
- Priority adjustments based on new information
### Backlog Health Indicators
- **Top items ready**: Next 2 sprints fully refined
- **Balanced mix**: New features, bugs, tech debt
- **Clear priorities**: Team knows what's next
- **No stale items**: Regular review and removal
## Output Format
Create comprehensive Product Owner deliverables:
1. **Planning Document**: `product-owner-analysis.md`
- Product vision and stakeholder analysis
- Backlog strategy and user story framework
- Feature prioritization and release planning
- Acceptance and validation approach
2. **Backlog Artifacts**:
- Product backlog with prioritized user stories
- Release plan with sprint assignments
- Acceptance criteria templates
- Definition of Ready and Done
## Brainstorming Documentation Files to Create
When conducting brainstorming sessions, create the following files:
### Individual Role Analysis File: `product-owner-analysis.md`
```markdown
# Product Owner Analysis: [Topic]
## Product Value Assessment
- Business value and ROI analysis
- User impact and benefit evaluation
- Market opportunity and competitive advantage
- Strategic alignment with product vision
## User Story Breakdown
- Epic and feature decomposition
- User story identification and format
- Acceptance criteria definition
- Story estimation and sizing
## Backlog Prioritization
- Priority ranking with justification
- MoSCoW or RICE scoring application
- Value vs. effort assessment
- Dependency and risk considerations
## Stakeholder & Requirements
- Stakeholder needs and expectations
- Requirement elicitation and validation
- Conflict resolution and negotiation
- Communication and feedback strategy
## Release Planning
- Sprint and release scope definition
- Timeline and milestone planning
- Success metrics and KPIs
- Risk mitigation and contingency plans
## Recommendations
- Prioritized feature roadmap
- User story specifications
- Acceptance and validation approach
- Stakeholder engagement strategy
```
### Session Contribution Template
For role-specific contributions to broader brainstorming sessions, provide:
- Business value and user impact analysis
- User story specifications with acceptance criteria
- Feature prioritization recommendations
- Stakeholder alignment and communication strategy
## Stakeholder Engagement
### Effective Communication
- Regular backlog reviews with stakeholders
- Transparent prioritization decisions
- Clear release plans and timelines
- Realistic expectation management
### Gathering Requirements
- User interviews and observation
- Stakeholder workshops and feedback sessions
- Data analysis and usage metrics
- Competitive research and market analysis
### Managing Conflicts
- Data-driven decision making
- Clear prioritization criteria
- Trade-off discussions and negotiation
- Escalation path for unresolved conflicts
## Key Success Factors
1. **Clear Product Vision**: Well-defined goals and strategy
2. **Stakeholder Alignment**: Shared understanding of priorities
3. **Healthy Backlog**: Refined, prioritized, and ready stories
4. **Value Focus**: Maximize ROI and user impact
5. **Transparent Communication**: Regular updates and feedback
6. **Data-Driven Decisions**: Metrics and evidence-based prioritization
7. **Empowered Team**: Trust and collaboration with development team
## Important Reminders
1. **You own the backlog**, but collaborate on solutions
2. **Prioritize ruthlessly** - not everything can be done
3. **Write clear acceptance criteria** - avoid ambiguity
4. **Be available** to the team for questions and clarification
5. **Balance** new features, bugs, and technical debt
6. **Measure success** - track value delivery and outcomes
7. **Say no** when necessary to protect scope and quality

View File

@@ -0,0 +1,37 @@
Analyze implementation patterns and code structure.
## Planning Required
Before providing analysis, you MUST:
1. Review all files in context (not just samples)
2. Identify patterns with file:line references
3. Distinguish good patterns from anti-patterns
4. Apply template requirements
## Core Checklist
- [ ] Analyze ALL files in CONTEXT
- [ ] Provide file:line references for each pattern
- [ ] Distinguish good patterns from anti-patterns
- [ ] Apply RULES template requirements
## REQUIRED ANALYSIS
1. Identify common code patterns and architectural decisions
2. Extract reusable utilities and shared components
3. Document existing conventions and coding standards
4. Assess pattern consistency and identify anti-patterns
5. Suggest improvements and optimization opportunities
## OUTPUT REQUIREMENTS
- Specific file:line references for all findings
- Code snippets demonstrating identified patterns
- Clear recommendations for pattern improvements
- Standards compliance assessment with priority levels
## Verification Checklist
Before finalizing output, verify:
- [ ] All CONTEXT files analyzed
- [ ] Every pattern has code reference (file:line)
- [ ] Anti-patterns clearly distinguished
- [ ] Recommendations prioritized by impact
## Output Requirements
Provide actionable insights with concrete implementation guidance.

View File

@@ -0,0 +1,33 @@
Analyze technical documents, research papers, and specifications systematically.
## CORE CHECKLIST ⚡
□ Plan analysis approach before reading (document type, key questions, success criteria)
□ Provide section/page references for all claims and findings
□ Distinguish facts from interpretations explicitly
□ Use precise, direct language - avoid persuasive wording
□ Apply RULES template requirements exactly as specified
## REQUIRED ANALYSIS
1. Document assessment: type, structure, audience, quality indicators
2. Content extraction: concepts, specifications, implementation details, constraints
3. Critical evaluation: strengths, gaps, ambiguities, clarity issues
4. Self-critique: verify citations, completeness, actionable recommendations
5. Synthesis: key takeaways, integration points, follow-up questions
## OUTPUT REQUIREMENTS
- Structured analysis with mandatory section/page references
- Evidence-based findings with specific location citations
- Clear separation of facts vs. interpretations
- Actionable recommendations tied to document content
- Integration points with existing project patterns
- Identified gaps and ambiguities with impact assessment
## VERIFICATION CHECKLIST ✓
□ Pre-analysis plan documented (3-5 bullet points)
□ All claims backed by section/page references
□ Self-critique completed before final output
□ Language is precise and direct (no persuasive adjectives)
□ Recommendations are specific and actionable
□ Output length proportional to document size
Focus: Evidence-based insights extraction with pre-planning and self-critique for technical documents.

View File

@@ -0,0 +1,127 @@
---
name: bug-diagnosis
description: 用于定位bug并提供修改建议
category: development
keywords: [bug诊断, 故障分析, 修复方案]
---
# Role & Output Requirements
**Role**: Software engineer specializing in bug diagnosis
**Output Format**: Diagnostic report in Chinese following the specified structure
**Constraints**: Do NOT write complete code files. Provide diagnostic analysis and targeted correction suggestions only.
## Core Capabilities
- Interpret symptoms from bug reports, stack traces, and logs
- Trace execution flow to identify root causes
- Formulate and validate hypotheses about bug origins
- Design targeted, low-risk corrections
- Analyze impact on other system components
## Analysis Process (Required)
**Before providing your final diagnosis, you MUST:**
1. Analyze symptoms and form initial hypothesis
2. Trace code execution to identify root cause
3. Design correction strategy
4. Assess potential impacts and risks
5. Present structured diagnostic report
## Objectives
1. Identify root cause (not just symptoms)
2. Propose targeted correction with justification
3. Assess risks and side effects
4. Provide verification steps
## Input
- Bug description (observed vs. expected behavior)
- Code snippets or file locations
- Logs, stack traces, error messages
- Reproduction steps (if available)
## Output Structure (Required)
Output in Chinese using this Markdown structure:
---
### 0. 诊断思维链 (Diagnostic Chain-of-Thought)
Present your analysis process in these steps:
1. **症状分析**: Summarize error symptoms and technical clues
2. **初步假设**: Identify suspicious code areas and form initial hypothesis
3. **根本原因定位**: Trace execution path to pinpoint exact cause
4. **修复方案设计**: Design targeted, low-risk correction
5. **影响评估**: Assess side effects and plan verification
### **故障诊断与修复建议报告 (Bug Diagnosis & Correction Proposal)**
### **第一部分:故障分析报告 (Part 1: Fault Analysis Report)**
* **1.1 故障现象描述 (Bug Symptom Description):**
* **观察到的行为 (Observed Behavior):** [清晰、客观地转述用户报告的异常现象或日志中的错误信息。]
* **预期的行为 (Expected Behavior):** [描述在正常情况下,系统或功能应有的表现。]
* **1.2 诊断分析过程 (Diagnostic Analysis Process):**
* **初步假设 (Initial Hypothesis):** [陈述您根据初步信息得出的第一个猜测。例如:初步判断,问题可能出在数据解析环节,因为错误日志显示了格式不匹配。]
* **根本原因分析 (Root Cause Analysis - RCA):** [**这是报告的核心。** 详细阐述您的逻辑推理过程,说明您是如何从表象追踪到根源的。例如:通过检查 `data_parser.py` 的 `parse_record` 函数,发现当输入记录的某个可选字段缺失时,代码并未处理该 `None` 值,而是直接对其调用了 `strip()` 方法,从而导致了 `AttributeError`。因此,**根本原因**是:**对可能为 None 的变量在未进行空值检查的情况下直接调用了方法**。]
* **1.3 根本原因摘要 (Root Cause Summary):** [用一句话高度概括 bug 的根本原因。]
### **第二部分:涉及文件概览 (Part 2: Involved Files Overview)**
* **文件列表 (File List):** [列出定位到问题或需要修改的所有相关文件名及路径。示例: `- src/parsers/data_parser.py (根本原因所在,直接修改)`]
### **第三部分:详细修复建议 (Part 3: Detailed Correction Plan)**
---
*针对每个需要修改的文件进行描述:*
**文件: [文件路径或文件名] (File: [File path or filename])**
* **1. 定位 (Location):**
* [清晰说明函数、类、方法或具体的代码区域,并指出大致行号。示例: 函数 `parse_record` 内部,约第 125 行]
* **2. 相关问题代码片段 (Relevant Problematic Code Snippet):**
* [引用导致问题的关键原始代码行,为开发者提供直接上下文。]
* ```[language]
// value = record.get(optional_field)
// processed_value = value.strip() // 此处引发错误
```
* **3. 修复描述与预期逻辑 (Correction Description & Intended Logic):**
* **建议修复措施 (Proposed Correction):**
* [用清晰的中文自然语言,描述需要进行的具体修改。例如:在调用 `.strip()` 方法之前,增加一个条件判断,检查 `value` 变量是否不为 `None`。]
* **修复后逻辑示意 (Corrected Logic Sketch):**
* [使用简洁的 `diff` 风格或伪代码来直观展示修改。]
* **示例:**
```diff
- processed_value = value.strip()
+ processed_value = value.strip() if value is not None else None
```
*或使用流程图:*
```
获取 optional_field ───► [value]
◊─── IF (value is not None) THEN
│ └───► value.strip() ───► [processed_value]
ELSE
│ └─── (赋值为 None) ───► [processed_value]
END IF
... (后续逻辑使用 processed_value) ...
```
* **修复理由 (Reason for Correction):** [解释为什么这个修改能解决之前分析出的**根本原因**。例如:此修改确保了只在变量 `value` 存在时才对其进行操作,从而避免了 `AttributeError`,解决了对 None 值的非法调用问题。]
* **4. 验证建议与风险提示 (Verification Suggestions & Risk Advisory):**
* **验证步骤 (Verification Steps):** [提供具体的测试建议来验证修复是否成功,以及是否引入新问题。例如:1. 构造一个optional_field字段存在的测试用例,确认其能被正常处理。2. **构造一个optional_field字段缺失的测试用例,确认程序不再崩溃,且 `processed_value` 为 `None` 或默认值。**]
* **潜在风险与注意事项 (Potential Risks & Considerations):** [指出此修改可能带来的任何潜在副作用或需要开发者注意的地方。例如:请注意,下游消费 `processed_value` 的代码现在必须能够正确处理 `None` 值。请检查相关调用方是否已做相应处理。]
---
*(对每个需要修改的文件重复上述格式)*
## Key Requirements
1. **Language**: All output in Chinese
2. **No Code Generation**: Use diff format or pseudo-code only. Do not write complete functions or files
3. **Focus on Root Cause**: Analysis must be logical and evidence-based
4. **State Assumptions**: Clearly note any assumptions when information is incomplete
## Self-Review Checklist
Before providing final output, verify:
- [ ] Diagnostic chain reflects logical debugging process
- [ ] Root cause analysis is clear and evidence-based
- [ ] Correction directly addresses root cause (not just symptoms)
- [ ] Correction is minimal and targeted (not broad refactoring)
- [ ] Verification steps are actionable
- [ ] No complete code blocks generated

View File

@@ -0,0 +1,70 @@
Create comprehensive tests for the codebase.
## Planning Required
Before creating tests, you MUST:
1. Analyze existing test coverage and identify gaps
2. Study testing frameworks and conventions used
3. Plan test strategy covering unit, integration, and e2e
4. Design test data management approach
## Core Checklist
- [ ] Analyze coverage gaps
- [ ] Follow testing frameworks and conventions
- [ ] Include unit, integration, and e2e tests
- [ ] Ensure tests are reliable and deterministic
## IMPLEMENTATION PHASES
### Test Strategy Phase
1. Analyze existing test coverage and identify gaps
2. Study codebase architecture and critical paths
3. Identify edge cases and error scenarios
4. Review testing frameworks and conventions used
### Unit Testing Phase
1. Write tests for individual functions and methods
2. Test all branches and conditional logic
3. Cover edge cases and boundary conditions
4. Mock external dependencies appropriately
### Integration Testing Phase
1. Test interactions between components and modules
2. Verify API endpoints and data flow
3. Test database operations and transactions
4. Validate external service integrations
### End-to-End Testing Phase
1. Test complete user workflows and scenarios
2. Verify critical business logic and processes
3. Test error handling and recovery mechanisms
4. Validate performance under load
### Quality Assurance
1. Ensure tests are reliable and deterministic
2. Make tests readable and maintainable
3. Add proper test documentation and comments
4. Follow testing best practices and conventions
### Test Data Management
1. Create realistic test data and fixtures
2. Ensure test isolation and cleanup
3. Use factories or builders for complex objects
4. Handle sensitive data appropriately in tests
## OUTPUT REQUIREMENTS
- Comprehensive test suite with high coverage
- Performance benchmarks where relevant
- Testing strategy and conventions documentation
- Test coverage metrics and quality improvements
- File:line references for tested code
## Verification Checklist
Before finalizing, verify:
- [ ] Coverage gaps filled
- [ ] All test types included
- [ ] Tests are reliable (no flaky tests)
- [ ] Test data properly managed
- [ ] Conventions followed
## Focus
High-quality, reliable test suite with comprehensive coverage.

View File

@@ -0,0 +1,58 @@
Implement a new feature following project conventions and best practices.
## Planning Required
Before implementing, you MUST:
1. Study existing code patterns and conventions
2. Review project architecture and design principles
3. Plan implementation with error handling and tests
4. Document integration points and dependencies
## Core Checklist
- [ ] Study existing code patterns first
- [ ] Follow project conventions and architecture
- [ ] Include comprehensive tests
- [ ] Provide file:line references
## IMPLEMENTATION PHASES
### Analysis Phase
1. Study existing code patterns and conventions
2. Identify similar features and their implementation approaches
3. Review project architecture and design principles
4. Understand dependencies and integration points
### Implementation Phase
1. Create feature following established patterns
2. Implement with proper error handling and validation
3. Add comprehensive logging for debugging
4. Follow security best practices
### Integration Phase
1. Ensure seamless integration with existing systems
2. Update configuration files as needed
3. Add proper TypeScript types and interfaces
4. Update documentation and comments
### Testing Phase
1. Write unit tests covering edge cases
2. Add integration tests for feature workflows
3. Verify error scenarios are properly handled
4. Test performance and security implications
## OUTPUT REQUIREMENTS
- File:line references for all changes
- Code examples demonstrating key patterns
- Explanation of architectural decisions made
- Documentation of new dependencies or configurations
- Test coverage summary
## Verification Checklist
Before finalizing, verify:
- [ ] Follows existing patterns
- [ ] Complete test coverage
- [ ] Documentation updated
- [ ] No breaking changes
- [ ] Security and performance validated
## Focus
Production-ready implementation with comprehensive testing and documentation.

View File

@@ -0,0 +1,49 @@
Generate module documentation focused on understanding and usage.
## Planning Required
Before providing documentation, you MUST:
1. Understand what the module does and why it exists
2. Review existing documentation to avoid duplication
3. Prepare practical usage examples
4. Identify module boundaries and dependencies
## Core Checklist
- [ ] Explain WHAT, WHY, and HOW
- [ ] Reference API.md instead of duplicating signatures
- [ ] Include practical usage examples
- [ ] Define module boundaries and dependencies
## DOCUMENTATION STRUCTURE
### 1. Purpose
- **What**: Clearly state what this module is responsible for.
- **Why**: Explain the problem it solves.
- **Boundaries**: Define what is in and out of scope.
### 2. Core Concepts
- Explain key concepts, patterns, or abstractions.
### 3. Usage Scenarios
- Provide 2-4 common use cases with code examples.
### 4. Dependencies
- List internal and external dependencies with explanations.
### 5. Configuration
- Document environment variables and configuration options.
### 6. Testing
- Explain how to run tests for the module.
### 7. Common Issues
- List common problems and their solutions.
## Verification Checklist
Before finalizing output, verify:
- [ ] Module purpose, scope, and boundaries are clear
- [ ] Core concepts are explained
- [ ] Usage examples are practical and realistic
- [ ] Dependencies and configuration are documented
## Focus
Explain module purpose and usage, not just API details.

View File

@@ -0,0 +1,266 @@
生成符合 RESTful 规范的完整 Swagger/OpenAPI API 文档。
## 核心检查清单 ⚡
□ 严格遵循 RESTful API 设计规范
□ 每个接口必须包含功能描述、请求方法、URL路径、参数说明
□ 必须包含全局 Security 配置Authorization Bearer Token
□ 使用中文命名目录,保持层级清晰
□ 每个字段需注明:类型、是否必填、示例值、说明
□ 包含成功和失败的响应示例
□ 标注接口版本和最后更新时间
## OpenAPI 规范结构
### 1. 文档信息 (info)
```yaml
openapi: 3.0.3
info:
title: {项目名称} API
description: |
{项目描述}
## 认证方式
所有需要认证的接口必须在请求头中携带 Bearer Token
```
Authorization: Bearer <your-token>
```
version: "1.0.0"
contact:
name: API 支持
email: api-support@example.com
license:
name: MIT
```
### 2. 服务器配置 (servers)
```yaml
servers:
- url: https://api.example.com/v1
description: 生产环境
- url: https://staging-api.example.com/v1
description: 测试环境
- url: http://localhost:3000/v1
description: 开发环境
```
### 3. 全局安全配置 (security)
```yaml
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: |
JWT Token 认证
获取方式:调用 POST /auth/login 接口
有效期24小时
刷新:调用 POST /auth/refresh 接口
security:
- bearerAuth: []
```
### 4. 接口路径规范 (paths)
```yaml
paths:
/users:
get:
tags:
- 用户管理
summary: 获取用户列表
description: |
分页获取系统用户列表,支持按状态、角色筛选。
**适用环境**: 开发、测试、生产
**前置条件**: 需要管理员权限
operationId: listUsers
security:
- bearerAuth: []
parameters:
- name: page
in: query
required: false
schema:
type: integer
default: 1
minimum: 1
description: 页码从1开始
example: 1
- name: limit
in: query
required: false
schema:
type: integer
default: 20
minimum: 1
maximum: 100
description: 每页数量
example: 20
responses:
'200':
description: 成功获取用户列表
content:
application/json:
schema:
$ref: '#/components/schemas/UserListResponse'
example:
code: 0
message: success
data:
items:
- id: "usr_123"
email: "user@example.com"
name: "张三"
total: 100
page: 1
limit: 20
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
```
### 5. 数据模型规范 (schemas)
```yaml
components:
schemas:
# 基础响应结构
BaseResponse:
type: object
required:
- code
- message
- timestamp
properties:
code:
type: integer
description: 业务状态码0表示成功
example: 0
message:
type: string
description: 响应消息
example: success
timestamp:
type: string
format: date-time
description: 响应时间戳
example: "2025-01-01T12:00:00Z"
# 错误响应
ErrorResponse:
type: object
required:
- code
- message
properties:
code:
type: string
description: 错误码
example: "AUTH_001"
message:
type: string
description: 错误信息
example: "Token 无效或已过期"
details:
type: object
description: 错误详情
additionalProperties: true
```
### 6. 统一响应定义 (responses)
```yaml
components:
responses:
UnauthorizedError:
description: 认证失败
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: "AUTH_001"
message: "Token 无效或已过期"
ForbiddenError:
description: 权限不足
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: "AUTH_003"
message: "权限不足,需要管理员角色"
NotFoundError:
description: 资源不存在
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: "BIZ_002"
message: "资源不存在"
ValidationError:
description: 参数验证失败
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: "PARAM_001"
message: "参数格式错误"
details:
field: "email"
reason: "邮箱格式不正确"
```
## 接口文档必填项
每个接口必须包含:
1. **基本信息**
- tags: 所属模块(中文)
- summary: 一句话描述
- description: 详细说明(含适用环境、前置条件)
- operationId: 唯一操作标识
2. **安全配置**
- security: 认证要求
3. **参数定义**
- name: 参数名
- in: 位置 (path/query/header/cookie)
- required: 是否必填
- schema: 类型定义(含 default, minimum, maximum
- description: 参数说明
- example: 示例值
4. **响应定义**
- 200: 成功响应(含完整示例)
- 400: 参数错误
- 401: 认证失败
- 403: 权限不足
- 404: 资源不存在(如适用)
- 500: 服务器错误
5. **版本信息**
- x-version: 接口版本
- x-updated: 最后更新时间
## 错误码规范
| 前缀 | 类别 | HTTP状态码 | 说明 |
|------|------|------------|------|
| AUTH_ | 认证错误 | 401/403 | 身份验证相关 |
| PARAM_ | 参数错误 | 400 | 请求参数验证 |
| BIZ_ | 业务错误 | 409/422 | 业务逻辑相关 |
| SYS_ | 系统错误 | 500/503 | 服务器异常 |
## RESTful 设计规范
1. **URL 命名**: 使用复数名词,小写,连字符分隔
2. **HTTP 方法**: GET(查询)、POST(创建)、PUT(更新)、DELETE(删除)、PATCH(部分更新)
3. **状态码**: 正确使用 2xx/3xx/4xx/5xx
4. **分页**: 使用 page/limit 或 offset/limit
5. **筛选**: 使用查询参数
6. **版本**: URL 路径 (/v1/) 或 请求头

View File

@@ -0,0 +1,109 @@
# 软件架构规划模板
## Role & Output Requirements
**Role**: Software architect specializing in technical planning
**Output Format**: Modification plan in Chinese following the specified structure
**Constraints**: Do NOT write or generate code. Provide planning and strategy only.
## Core Capabilities
- Understand complex codebases (structure, patterns, dependencies, data flow)
- Analyze requirements and translate to technical objectives
- Apply software design principles (SOLID, DRY, KISS, design patterns)
- Assess impacts, dependencies, and risks
- Create step-by-step modification plans
## Planning Process (Required)
**Before providing your final plan, you MUST:**
1. Analyze requirements and identify technical objectives
2. Explore existing code structure and patterns
3. Identify modification points and formulate strategy
4. Assess dependencies and risks
5. Present structured modification plan
## Objectives
1. Understand context (code, requirements, project background)
2. Analyze relevant code sections and their relationships
3. Create step-by-step modification plan (what, where, why, how)
4. Illustrate intended logic using call flow diagrams
5. Provide implementation context (variables, dependencies, side effects)
## Input
- Code snippets or file locations
- Modification requirements and goals
- Project context (if available)
## Output Structure (Required)
Output in Chinese using this Markdown structure:
---
### 0. 思考过程与规划策略 (Thinking Process & Planning Strategy)
Present your planning process in these steps:
1. **需求解析**: Break down requirements and clarify core objectives
2. **代码结构勘探**: Analyze current code structure and logic flow
3. **核心修改点识别**: Identify modification points and formulate strategy
4. **依赖与风险评估**: Assess dependencies and risks
5. **规划文档组织**: Organize planning document
### **代码修改规划方案 (Code Modification Plan)**
### **第一部分:需求分析与规划总览 (Part 1: Requirements Analysis & Planning Overview)**
* **1.1 用户原始需求结构化解析 (Structured Analysis of Users Original Requirements):**
* [将用户的原始需求拆解成一个或多个清晰、独立、可操作的要点列表。每个要点都是一个明确的目标。]
* **- 需求点 A:** [描述第一个具体需求]
* **- 需求点 B:** [描述第二个具体需求]
* **- ...**
* **1.2 技术实现目标与高级策略 (Technical Implementation Goals & High-Level Strategy):**
* [基于上述需求分析,将其转化为具体的、可衡量的技术目标。并简述为达成这些目标将采用的整体技术思路或架构策略。例如:为实现【需求点A】,我们需要在 `ServiceA` 中引入一个新的处理流程。为实现【需求点B】,我们将重构 `ModuleB` 的数据验证逻辑,以提高其扩展性。]
### **第二部分:涉及文件概览 (Part 2: Involved Files Overview)**
* **文件列表 (File List):** [列出所有识别出的相关文件名(若路径已知/可推断,请包含路径)。不仅包括直接修改的文件,也包括提供关键上下文或可能受间接影响的文件。示例: `- src/core/module_a.py (直接修改)`, `- src/utils/helpers.py (依赖项,可能受影响)`, `- configs/settings.json (配置参考)`]
### **第三部分:详细修改计划 (Part 3: Detailed Modification Plan)**
---
*针对每个需要直接修改的文件进行描述:*
**文件: [文件路径或文件名] (File: [File path or filename])**
* **1. 位置 (Location):**
* [清晰说明函数、类、方法或具体的代码区域,如果可能,指出大致行号范围。示例: 函数 `calculate_total_price` 内部,约第 75-80 行]
* **1.bis 相关原始代码片段 (Relevant Original Code Snippet):**
* [**在此处引用需要修改或在其附近进行修改的、最相关的几行原始代码。** 这为开发者提供了直接的上下文。如果代码未提供,则注明相关代码未提供,根据描述进行规划。]
* ```[language]
// 引用相关的1-5行原始代码
```
* **2. 修改描述与预期逻辑 (Modification Description & Intended Logic):**
* **当前状态简述 (Brief Current State):** [可选,如果有助于理解变更,简述当前位置代码的核心功能。]
* **拟议修改点 (Proposed Changes):**
* [分步骤详细描述需要进行的逻辑更改。用清晰的中文自然语言解释 *什么* 需要被改变或添加。]
* **预期逻辑与数据流示意 (Intended Logic and Data Flow Sketch):**
* [使用简洁调用图的风格,描述此修改点引入或改变后的 *预期* 控制流程和关键数据传递。]
* [**图例参考**: `───►` 调用/流程转向, `◄───` 返回/结果, `◊───` 条件分支, `ループ` 循环块, `[数据]` 表示关键数据, `// 注释` ]
* **修改理由 (Reason for Modification):** [解释 *为什么* 这个修改是必要的,并明确关联到 **第一部分** 中解析出的某个【需求点】或【技术目标】。]
* **预期结果 (Intended Outcome):** [描述此修改完成后,该代码段预期的行为或产出。]
* **3. 必要上下文与注意事项 (Necessary Context & Considerations):**
* [提及实施者在进行此特定更改时必须了解的关键变量、数据结构、已有函数的依赖关系、新引入的依赖。]
* [**重点指出**潜在的连锁反应、对其他模块的可能影响、性能考量、错误处理、事务性、并发问题或数据完整性等重要风险点。]
---
*(对每个需要修改的文件重复上述格式)*
## Key Requirements
1. **Language**: All output in Chinese
2. **No Code Generation**: Do not write actual code. Provide descriptive modification plan only
3. **Focus**: Detail what and why. Use logic sketches to illustrate how
4. **Completeness**: State assumptions clearly when information is incomplete
## Self-Review Checklist
Before providing final output, verify:
- [ ] Thinking process outlines structured analytical approach
- [ ] All requirements addressed in the plan
- [ ] Plan is logical, actionable, and detailed
- [ ] Modification reasons link back to requirements
- [ ] Context and risks are highlighted
- [ ] No actual code generated

View File

@@ -0,0 +1,122 @@
# Rule Template: API Rules (Backend/Fullstack Only)
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {FILE_EXT}: File extension pattern
- {API_FRAMEWORK}: API framework (Express, FastAPI, etc)
## Output Format
```markdown
---
paths:
- "**/api/**/*.{FILE_EXT}"
- "**/routes/**/*.{FILE_EXT}"
- "**/endpoints/**/*.{FILE_EXT}"
- "**/controllers/**/*.{FILE_EXT}"
- "**/handlers/**/*.{FILE_EXT}"
---
# {TECH_STACK_NAME} API Rules
## Endpoint Design
[REST/GraphQL conventions from Exa research]
### URL Structure
- Resource naming (plural nouns)
- Nesting depth limits
- Query parameter conventions
- Version prefixing
### HTTP Methods
- GET: Read operations
- POST: Create operations
- PUT/PATCH: Update operations
- DELETE: Remove operations
### Status Codes
- 2xx: Success responses
- 4xx: Client errors
- 5xx: Server errors
## Request Validation
[Input validation patterns]
### Schema Validation
```{lang}
// Example validation schema
```
### Required Fields
- Validation approach
- Error messages format
- Sanitization rules
## Response Format
[Standard response structures]
### Success Response
```json
{
"data": {},
"meta": {}
}
```
### Pagination
```json
{
"data": [],
"pagination": {
"page": 1,
"limit": 20,
"total": 100
}
}
```
## Error Responses
[Error handling for APIs]
### Error Format
```json
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"details": {}
}
}
```
### Common Error Codes
- VALIDATION_ERROR
- NOT_FOUND
- UNAUTHORIZED
- FORBIDDEN
## Authentication & Authorization
[Auth patterns]
- Token handling
- Permission checks
- Rate limiting
## Documentation
[API documentation standards]
- OpenAPI/Swagger
- Inline documentation
- Example requests/responses
```
## Content Guidelines
- Focus on API-specific patterns
- Include request/response examples
- Cover security considerations
- Reference framework conventions

View File

@@ -0,0 +1,122 @@
# Rule Template: Component Rules (Frontend/Fullstack Only)
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {FILE_EXT}: File extension pattern
- {UI_FRAMEWORK}: UI framework (React, Vue, etc)
## Output Format
```markdown
---
paths:
- "**/components/**/*.{FILE_EXT}"
- "**/ui/**/*.{FILE_EXT}"
- "**/views/**/*.{FILE_EXT}"
- "**/pages/**/*.{FILE_EXT}"
---
# {TECH_STACK_NAME} Component Rules
## Component Structure
[Organization patterns from Exa research]
### File Organization
```
components/
├── common/ # Shared components
├── features/ # Feature-specific
├── layout/ # Layout components
└── ui/ # Base UI elements
```
### Component Template
```{lang}
// Standard component structure
```
### Naming Conventions
- PascalCase for components
- Descriptive names
- Prefix conventions (if any)
## Props & State
[State management guidelines]
### Props Definition
```{lang}
// Props type/interface example
```
### Props Best Practices
- Required vs optional
- Default values
- Prop validation
- Prop naming
### Local State
- When to use local state
- State initialization
- State updates
### Shared State
- State management approach
- Context usage
- Store patterns
## Styling
[CSS/styling conventions]
### Approach
- [CSS Modules/Styled Components/Tailwind/etc]
### Style Organization
```{lang}
// Style example
```
### Naming Conventions
- Class naming (BEM, etc)
- CSS variable usage
- Theme integration
## Accessibility
[A11y requirements]
### Essential Requirements
- Semantic HTML
- ARIA labels
- Keyboard navigation
- Focus management
### Testing A11y
- Automated checks
- Manual testing
- Screen reader testing
## Performance
[Performance guidelines]
### Optimization Patterns
- Memoization
- Lazy loading
- Code splitting
- Virtual lists
### Avoiding Re-renders
- When to memoize
- Callback optimization
- State structure
```
## Content Guidelines
- Focus on component-specific patterns
- Include framework-specific examples
- Cover accessibility requirements
- Address performance considerations

View File

@@ -0,0 +1,89 @@
# Rule Template: Configuration Rules
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {CONFIG_FILES}: List of config file patterns
## Output Format
```markdown
---
paths:
- "*.config.*"
- ".*rc"
- ".*rc.{js,json,yaml,yml}"
- "package.json"
- "tsconfig*.json"
- "pyproject.toml"
- "Cargo.toml"
- "go.mod"
- ".env*"
---
# {TECH_STACK_NAME} Configuration Rules
## Project Setup
[Configuration guidelines from Exa research]
### Essential Config Files
- [List primary config files]
- [Purpose of each]
### Recommended Structure
```
project/
├── [config files]
├── src/
└── tests/
```
## Tooling
[Linters, formatters, bundlers]
### Linting
- Tool: [ESLint/Pylint/etc]
- Config file: [.eslintrc/pyproject.toml/etc]
- Key rules to enable
### Formatting
- Tool: [Prettier/Black/etc]
- Integration with editor
- Pre-commit hooks
### Build Tools
- Bundler: [Webpack/Vite/etc]
- Build configuration
- Optimization settings
## Environment
[Environment management]
### Environment Variables
- Naming conventions
- Required vs optional
- Secret handling
- .env file structure
### Development vs Production
- Environment-specific configs
- Feature flags
- Debug settings
## Dependencies
[Dependency management]
- Lock file usage
- Version pinning strategy
- Security updates
- Peer dependencies
```
## Content Guidelines
- Focus on config file best practices
- Include security considerations
- Cover development workflow setup
- Mention CI/CD integration where relevant

View File

@@ -0,0 +1,60 @@
# Rule Template: Core Principles
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {FILE_EXT}: File extension pattern
## Output Format
```markdown
---
paths: **/*.{FILE_EXT}
---
# {TECH_STACK_NAME} Core Principles
## Philosophy
[Synthesize core philosophy from Exa research]
- Key paradigms and mental models
- Design philosophy
- Community conventions
## Naming Conventions
[Language-specific naming rules]
- Variables and functions
- Classes and types
- Files and directories
- Constants and enums
## Code Organization
[Structure and module guidelines]
- File structure patterns
- Module boundaries
- Import organization
- Dependency management
## Type Safety
[Type system best practices - if applicable]
- Type annotation guidelines
- Generic usage patterns
- Type inference vs explicit types
- Null/undefined handling
## Documentation
[Documentation standards]
- Comment style
- JSDoc/docstring format
- README conventions
```
## Content Guidelines
- Focus on universal principles that apply to ALL files
- Keep rules actionable and specific
- Include rationale for each rule
- Reference official style guides where applicable

View File

@@ -0,0 +1,70 @@
# Rule Template: Implementation Patterns
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {FILE_EXT}: File extension pattern
## Output Format
```markdown
---
paths: src/**/*.{FILE_EXT}
---
# {TECH_STACK_NAME} Implementation Patterns
## Common Patterns
[With code examples from Exa research]
### Pattern 1: [Name]
```{lang}
// Example code
```
**When to use**: [Context]
**Benefits**: [Why this pattern]
### Pattern 2: [Name]
...
## Anti-Patterns to Avoid
[Common mistakes with examples]
### Anti-Pattern 1: [Name]
```{lang}
// Bad example
```
**Problem**: [Why it's bad]
**Solution**: [Better approach]
## Error Handling
[Error handling conventions]
- Error types and hierarchy
- Try-catch patterns
- Error propagation
- Logging practices
## Async Patterns
[Asynchronous code conventions - if applicable]
- Promise handling
- Async/await usage
- Concurrency patterns
- Error handling in async code
## State Management
[State handling patterns]
- Local state patterns
- Shared state approaches
- Immutability practices
```
## Content Guidelines
- Focus on source code implementation
- Provide concrete code examples
- Show both good and bad patterns
- Include context for when to apply each pattern

View File

@@ -0,0 +1,81 @@
# Rule Template: Testing Rules
## Variables
- {TECH_STACK_NAME}: Tech stack display name
- {FILE_EXT}: File extension pattern
- {TEST_FRAMEWORK}: Primary testing framework
## Output Format
```markdown
---
paths:
- "**/*.{test,spec}.{FILE_EXT}"
- "tests/**/*.{FILE_EXT}"
- "__tests__/**/*.{FILE_EXT}"
- "**/test_*.{FILE_EXT}"
- "**/*_test.{FILE_EXT}"
---
# {TECH_STACK_NAME} Testing Rules
## Testing Framework
[Recommended frameworks from Exa research]
- Primary: {TEST_FRAMEWORK}
- Assertion library
- Mocking library
- Coverage tool
## Test Structure
[Organization patterns]
### File Naming
- Unit tests: `*.test.{ext}` or `*.spec.{ext}`
- Integration tests: `*.integration.test.{ext}`
- E2E tests: `*.e2e.test.{ext}`
### Test Organization
```{lang}
describe('[Component/Module]', () => {
describe('[method/feature]', () => {
it('should [expected behavior]', () => {
// Arrange
// Act
// Assert
});
});
});
```
## Mocking & Fixtures
[Best practices]
- Mock creation patterns
- Fixture organization
- Test data factories
- Cleanup strategies
## Assertions
[Assertion patterns]
- Common assertions
- Custom matchers
- Async assertions
- Error assertions
## Coverage Requirements
[Coverage guidelines]
- Minimum coverage thresholds
- What to cover vs skip
- Coverage report interpretation
```
## Content Guidelines
- Include framework-specific patterns
- Show test structure examples
- Cover both unit and integration testing
- Include async testing patterns

View File

@@ -0,0 +1,89 @@
# Tech Stack Rules Generation Agent Prompt
## Context Variables
- {TECH_STACK_NAME}: Normalized tech stack name (e.g., "typescript-react")
- {PRIMARY_LANG}: Primary language (e.g., "typescript")
- {FILE_EXT}: File extension pattern (e.g., "{ts,tsx}")
- {FRAMEWORK_TYPE}: frontend | backend | fullstack | library
- {COMPONENTS}: Array of tech components
- {OUTPUT_DIR}: .claude/rules/tech/{TECH_STACK_NAME}/
## Agent Instructions
Generate path-conditional rules for Claude Code automatic loading.
### Step 1: Execute Exa Research
Run 4-6 parallel queries based on tech stack:
**Base Queries** (always execute):
```
mcp__exa__get_code_context_exa(query: "{PRIMARY_LANG} best practices principles 2025", tokensNum: 8000)
mcp__exa__get_code_context_exa(query: "{PRIMARY_LANG} implementation patterns examples", tokensNum: 7000)
mcp__exa__get_code_context_exa(query: "{PRIMARY_LANG} testing strategies conventions", tokensNum: 5000)
mcp__exa__web_search_exa(query: "{PRIMARY_LANG} configuration setup 2025", numResults: 5)
```
**Component Queries** (for each framework in COMPONENTS):
```
mcp__exa__get_code_context_exa(query: "{PRIMARY_LANG} {component} integration patterns", tokensNum: 5000)
```
### Step 2: Read Rule Templates
Read each template file before generating content:
```
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-core.txt)
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-patterns.txt)
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-testing.txt)
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-config.txt)
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-api.txt) # Only if backend/fullstack
Read(~/.ccw/workflows/cli-templates/prompts/rules/rule-components.txt) # Only if frontend/fullstack
```
### Step 3: Generate Rule Files
Create directory and write files:
```bash
mkdir -p "{OUTPUT_DIR}"
```
**Always Generate**:
- core.md (from rule-core.txt template)
- patterns.md (from rule-patterns.txt template)
- testing.md (from rule-testing.txt template)
- config.md (from rule-config.txt template)
**Conditional**:
- api.md: Only if FRAMEWORK_TYPE == 'backend' or 'fullstack'
- components.md: Only if FRAMEWORK_TYPE == 'frontend' or 'fullstack'
### Step 4: Write Metadata
```json
{
"tech_stack": "{TECH_STACK_NAME}",
"primary_lang": "{PRIMARY_LANG}",
"file_ext": "{FILE_EXT}",
"framework_type": "{FRAMEWORK_TYPE}",
"components": ["{COMPONENTS}"],
"generated_at": "{ISO_TIMESTAMP}",
"source": "exa-research",
"files_generated": ["core.md", "patterns.md", "testing.md", "config.md", ...]
}
```
### Step 5: Report Completion
Provide summary:
- Files created with their path patterns
- Exa queries executed (count)
- Sources consulted (count)
## Critical Requirements
1. Every .md file MUST start with `paths` YAML frontmatter
2. Use {FILE_EXT} consistently across all rule files
3. Synthesize Exa research into actionable rules
4. Include code examples from Exa sources
5. Keep each file focused on its specific domain

View File

@@ -0,0 +1,38 @@
PURPOSE: Generate comprehensive multi-layer test enhancement suggestions
- Success: Cover L0-L3 layers with focus on API, integration, and error scenarios
- Scope: Files with coverage gaps identified in TEST_ANALYSIS_RESULTS.md
- Goal: Provide specific, actionable test case suggestions that increase coverage completeness
TASK:
• L1 (Unit Tests): Suggest edge cases, boundary conditions, error paths, state transitions
• L2.1 (Integration): Suggest module interaction patterns, dependency injection scenarios
• L2.2 (API Contracts): Suggest request/response test cases, validation, status codes, error responses
• L2.4 (External APIs): Suggest mock strategies, failure scenarios, timeout handling, retry logic
• L2.5 (Failure Modes): Suggest exception hierarchies, error propagation, recovery strategies
• Cross-cutting: Suggest performance test cases, security considerations
MODE: analysis
CONTEXT: @.workflow/active/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md
Memory: Project type, test framework, existing test patterns, coverage gaps
EXPECTED: Markdown report with structured test enhancement suggestions organized by:
1. File-level test requirements (per file needing tests)
2. Layer-specific test cases (L1, L2.1, L2.2, L2.4, L2.5)
3. Each suggestion includes:
- Test type and layer (e.g., "L2.2 API Contract Test")
- Specific test case description (e.g., "POST /api/users - Invalid email format")
- Expected behavior (e.g., "Returns 400 with validation error message")
- Dependencies/mocks needed (e.g., "Mock email service")
- Success criteria (e.g., "Status 400, error.field === 'email'")
4. Test ordering/dependencies (which tests should run first)
5. Integration test strategies (how components interact)
6. Error scenario matrix (all failure modes covered)
CONSTRAINTS:
- Focus on identified coverage gaps from TEST_ANALYSIS_RESULTS.md
- Prioritize API tests, integration tests, and error scenarios
- No code generation - suggestions only with sufficient detail for implementation
- Consider project conventions and existing test patterns
- Each suggestion should be actionable and specific (not generic)
- Output format: Markdown with clear section headers

View File

@@ -0,0 +1,179 @@
PURPOSE: Analyze test coverage gaps and design comprehensive test generation strategy
TASK:
• Read test-context-package.json to understand coverage gaps and framework
• Study implementation context from source session summaries
• Analyze existing test patterns and conventions
• Design test requirements for missing coverage
• Generate actionable test generation strategy
MODE: analysis
CONTEXT: @test-context-package.json @../../../{source-session-id}/.summaries/*.md
EXPECTED: Comprehensive test analysis document (gemini-test-analysis.md) with test requirements, scenarios, and generation strategy
RULES:
- Focus on test requirements and strategy, NOT code generation
- Study existing test patterns for consistency
- Prioritize critical business logic tests
- Specify clear test scenarios and coverage targets
- Identify all dependencies requiring mocks
- Output ONLY test analysis and generation strategy
## ANALYSIS REQUIREMENTS
### 1. Implementation Understanding
- Load all implementation summaries from source session
- Understand implemented features, APIs, and business logic
- Extract key functions, classes, and modules
- Identify integration points and dependencies
### 2. Existing Test Pattern Analysis
- Study existing test files for patterns and conventions
- Identify test structure (describe/it, test suites, fixtures)
- Analyze assertion patterns and mocking strategies
- Extract test setup/teardown patterns
### 3. Coverage Gap Assessment
For each file in missing_tests[], analyze:
- File purpose and functionality
- Public APIs requiring test coverage
- Critical paths and edge cases
- Integration points requiring tests
- Priority: high (core logic), medium (utilities), low (helpers)
### 4. Test Requirements Specification
For each missing test file, specify:
- Test scope: What needs to be tested
- Test scenarios: Happy path, error cases, edge cases, integration
- Test data: Required fixtures, mocks, test data
- Dependencies: External services, databases, APIs to mock
- Coverage targets: Functions/methods requiring tests
### 5. Test Generation Strategy
- Determine test generation approach for each file
- Identify reusable test patterns from existing tests
- Plan test data and fixture requirements
- Define mocking strategy for dependencies
- Specify expected test file structure
## EXPECTED OUTPUT FORMAT
Write comprehensive analysis to gemini-test-analysis.md:
# Test Generation Analysis
## 1. Implementation Context Summary
- **Source Session**: {source_session_id}
- **Implemented Features**: {feature_summary}
- **Changed Files**: {list_of_implementation_files}
- **Tech Stack**: {technologies_used}
## 2. Test Coverage Assessment
- **Existing Tests**: {count} files
- **Missing Tests**: {count} files
- **Coverage Percentage**: {percentage}%
- **Priority Breakdown**:
- High Priority: {count} files (core business logic)
- Medium Priority: {count} files (utilities, helpers)
- Low Priority: {count} files (configuration, constants)
## 3. Existing Test Pattern Analysis
- **Test Framework**: {framework_name_and_version}
- **File Naming Convention**: {pattern}
- **Test Structure**: {describe_it_or_other}
- **Assertion Style**: {expect_assert_should}
- **Mocking Strategy**: {mocking_framework_and_patterns}
- **Setup/Teardown**: {beforeEach_afterEach_patterns}
- **Test Data**: {fixtures_factories_builders}
## 4. Test Requirements by File
### File: {implementation_file_path}
**Test File**: {suggested_test_file_path}
**Priority**: {high|medium|low}
#### Scope
- {description_of_what_needs_testing}
#### Test Scenarios
1. **Happy Path Tests**
- {scenario_1}
- {scenario_2}
2. **Error Handling Tests**
- {error_scenario_1}
- {error_scenario_2}
3. **Edge Case Tests**
- {edge_case_1}
- {edge_case_2}
4. **Integration Tests** (if applicable)
- {integration_scenario_1}
- {integration_scenario_2}
#### Test Data & Fixtures
- {required_test_data}
- {required_mocks}
- {required_fixtures}
#### Dependencies to Mock
- {external_service_1}
- {external_service_2}
#### Coverage Targets
- Function: {function_name} - {test_requirements}
- Function: {function_name} - {test_requirements}
---
[Repeat for each missing test file]
---
## 5. Test Generation Strategy
### Overall Approach
- {strategy_description}
### Test Generation Order
1. {file_1} - {rationale}
2. {file_2} - {rationale}
3. {file_3} - {rationale}
### Reusable Patterns
- {pattern_1_from_existing_tests}
- {pattern_2_from_existing_tests}
### Test Data Strategy
- {approach_to_test_data_and_fixtures}
### Mocking Strategy
- {approach_to_mocking_dependencies}
### Quality Criteria
- Code coverage target: {percentage}%
- Test scenarios per function: {count}
- Integration test coverage: {approach}
## 6. Implementation Targets
**Purpose**: Identify new test files to create
**Format**: New test files only (no existing files to modify)
**Test Files to Create**:
1. **Target**: `tests/auth/TokenValidator.test.ts`
- **Type**: Create new test file
- **Purpose**: Test TokenValidator class
- **Scenarios**: 15 test cases covering validation logic, error handling, edge cases
- **Dependencies**: Mock JWT library, test fixtures for tokens
2. **Target**: `tests/middleware/errorHandler.test.ts`
- **Type**: Create new test file
- **Purpose**: Test error handling middleware
- **Scenarios**: 8 test cases for different error types and response formats
- **Dependencies**: Mock Express req/res/next, error fixtures
[List all test files to create]
## 7. Success Metrics
- **Test Coverage Goal**: {target_percentage}%
- **Test Quality**: All scenarios covered (happy, error, edge, integration)
- **Convention Compliance**: Follow existing test patterns
- **Maintainability**: Clear test descriptions, reusable fixtures

View File

@@ -0,0 +1,176 @@
Validate technical feasibility and identify implementation risks for proposed solution design.
## CORE CHECKLIST ⚡
□ Read context-package.json and gemini-solution-design.md
□ Assess complexity, validate technology choices
□ Evaluate performance and security implications
□ Focus on TECHNICAL FEASIBILITY and RISK ASSESSMENT
□ Write output to specified .workflow/active/{session_id}/.process/ path
## PREREQUISITE ANALYSIS
### Required Input Files
1. **context-package.json**: Task requirements, source files, tech stack
2. **gemini-solution-design.md**: Proposed solution design and architecture
3. **workflow-session.json**: Session state and context
4. **CLAUDE.md**: Project standards and conventions
### Analysis Dependencies
- Review Gemini's proposed solution design
- Validate against actual codebase capabilities
- Assess implementation complexity realistically
- Identify gaps between design and execution
## REQUIRED VALIDATION
### 1. Feasibility Assessment
- **Complexity Rating**: Rate technical complexity (1-5 scale)
- 1: Trivial - straightforward implementation
- 2: Simple - well-known patterns
- 3: Moderate - some challenges
- 4: Complex - significant challenges
- 5: Very Complex - high risk, major unknowns
- **Resource Requirements**: Estimate development effort
- Development time (hours/days/weeks)
- Required expertise level
- Infrastructure needs
- **Technology Compatibility**: Validate proposed tech stack
- Framework version compatibility
- Library maturity and support
- Integration with existing systems
### 2. Risk Analysis
- **Implementation Risks**: Technical challenges and blockers
- Unknown implementation patterns
- Missing capabilities or APIs
- Breaking changes to existing code
- **Integration Challenges**: System integration concerns
- Data format compatibility
- API contract changes
- Dependency conflicts
- **Performance Concerns**: Performance and scalability risks
- Resource consumption (CPU, memory, I/O)
- Latency and throughput impact
- Caching and optimization needs
- **Security Concerns**: Security vulnerabilities and threats
- Authentication/authorization gaps
- Data exposure risks
- Compliance violations
### 3. Implementation Validation
- **Development Approach**: Validate proposed implementation strategy
- Verify module dependency order
- Assess incremental development feasibility
- Evaluate testing approach
- **Quality Standards**: Validate quality requirements
- Test coverage achievability
- Performance benchmark realism
- Documentation completeness
- **Maintenance Implications**: Long-term sustainability
- Code maintainability assessment
- Technical debt evaluation
- Evolution and extensibility
### 4. Code Target Verification
Review Gemini's proposed code targets:
- **Validate existing targets**: Confirm file:function:lines exist
- **Assess new file targets**: Evaluate necessity and placement
- **Identify missing targets**: Suggest additional modification points
- **Refine target specifications**: Provide more precise line numbers if possible
### 5. Recommendations
- **Must-Have Requirements**: Critical requirements for success
- **Optimization Opportunities**: Performance and quality improvements
- **Security Controls**: Essential security measures
- **Risk Mitigation**: Strategies to reduce identified risks
## OUTPUT REQUIREMENTS
### Output File
**Path**: `.workflow/active/{session_id}/.process/codex-feasibility-validation.md`
**Format**: Follow structure from `~/.ccw/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt`
### Required Sections
Focus on these sections from the template:
- Executive Summary (with Codex perspective)
- Current State Analysis (validation findings)
- Implementation Strategy (feasibility assessment)
- Solution Optimization (risk mitigation)
- Confidence Scores (technical feasibility focus)
### Content Guidelines
- ✅ Focus on technical feasibility and risk assessment
- ✅ Verify code targets from Gemini's design
- ✅ Provide concrete risk mitigation strategies
- ✅ Quantify complexity and effort estimates
- ❌ Do NOT create task breakdowns
- ❌ Do NOT provide step-by-step implementation guides
- ❌ Do NOT include code examples
## VALIDATION METHODOLOGY
### Complexity Scoring
Rate each aspect on 1-5 scale:
- Technical Complexity
- Integration Complexity
- Performance Risk
- Security Risk
- Maintenance Burden
### Risk Classification
- **LOW**: Minor issues, easily addressable
- **MEDIUM**: Manageable challenges with clear mitigation
- **HIGH**: Significant concerns requiring major mitigation
- **CRITICAL**: Fundamental viability threats
### Feasibility Judgment
- **PROCEED**: Technically feasible with acceptable risk
- **PROCEED_WITH_MODIFICATIONS**: Feasible but needs adjustments
- **RECONSIDER**: High risk, major changes needed
- **REJECT**: Not feasible with current approach
## CONTEXT INTEGRATION
### Gemini Analysis Integration
- Review proposed architecture and design decisions
- Validate assumptions and technology choices
- Cross-check code targets against actual codebase
- Assess realism of performance targets
### Codebase Reality Check
- Verify existing code capabilities
- Identify actual technical constraints
- Assess team skill compatibility
- Evaluate infrastructure readiness
### Session Context
- Consider session history and previous decisions
- Align with project architecture standards
- Respect existing patterns and conventions
## EXECUTION MODE
**Mode**: Analysis with write permission for output file
**CLI Tool**: Codex with --skip-git-repo-check -s danger-full-access
**Timeout**: 60-90 minutes for complex tasks
**Output**: Single file codex-feasibility-validation.md
**Trigger**: Only for complex tasks (>6 modules)
## VERIFICATION CHECKLIST ✓
□ context-package.json and gemini-solution-design.md read
□ Complexity rated on 1-5 scale with justification
□ All risk categories assessed (technical, integration, performance, security)
□ Code targets verified and refined
□ Risk mitigation strategies provided
□ Resource requirements estimated
□ Final feasibility judgment (PROCEED/RECONSIDER/REJECT)
□ Output written to .workflow/active/{session_id}/.process/codex-feasibility-validation.md
Focus: Technical feasibility validation with realistic risk assessment and mitigation strategies.

View File

@@ -0,0 +1,131 @@
Analyze and design optimal solution with comprehensive architecture evaluation and design decisions.
## CORE CHECKLIST ⚡
□ Read context-package.json to understand task requirements, source files, tech stack
□ 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/active/{session_id}/.process/ path
## ANALYSIS PRIORITY
### Source Hierarchy
1. **PRIMARY**: Individual role analysis.md files (system-architect, ui-designer, data-architect, etc.)
- Technical details and implementation considerations
- Architecture Decision Records (ADRs)
- Design decision context and rationale
2. **SECONDARY**: role analysis documents
- Integrated requirements across roles
- Cross-role alignment and dependencies
- Unified feature specifications
3. **REFERENCE**: guidance-specification.md
- Discussion context and background
- Initial problem framing
## REQUIRED ANALYSIS
### 1. Current State Assessment
- Identify existing architectural patterns and code structure
- Map integration points and dependencies
- Evaluate technical debt and pain points
- Assess framework compatibility and constraints
### 2. Solution Design
- Propose core architecture principles and approach
- Design component architecture and data flow
- Specify API contracts and integration strategy
- Define technology stack with justification
### 3. Key Design Decisions
For each critical decision:
- **Decision**: What is being decided
- **Rationale**: Why this approach
- **Alternatives Considered**: Other options and their tradeoffs
- **Impact**: Implications on architecture, performance, maintainability
Minimum 2 key decisions required.
### 4. Code Modification Targets
Identify specific code locations for changes:
- **Existing files**: `file:function:lines` format (e.g., `src/auth/login.ts:validateUser:45-52`)
- **New files**: `file` only (e.g., `src/auth/PasswordReset.ts`)
- **Unknown lines**: `file:function:*` (e.g., `src/auth/service.ts:refreshToken:*`)
For each target:
- Type: Modify existing | Create new
- Modification/Purpose: What changes needed
- Rationale: Why this target
### 5. Critical Insights
- Strengths: What works well in current/proposed design
- Gaps: Missing capabilities or concerns
- Risks: Technical, integration, performance, security
- Optimization Opportunities: Performance, security, code quality
### 6. Feasibility Assessment
- Technical Complexity: Rating and analysis
- Performance Impact: Expected characteristics
- Resource Requirements: Development effort
- Maintenance Burden: Ongoing considerations
## OUTPUT REQUIREMENTS
### Output File
**Path**: `.workflow/active/{session_id}/.process/gemini-solution-design.md`
**Format**: Follow structure from `~/.ccw/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt`
### Required Sections
- Executive Summary with feasibility score
- Current State Analysis
- Proposed Solution Design with 2+ key decisions
- Implementation Strategy with code targets
- Solution Optimization (performance, security, quality)
- Critical Success Factors
- Confidence Scores with recommendation
### Content Guidelines
- ✅ Focus on solution improvements and key design decisions
- ✅ Include rationale, alternatives, and tradeoffs for decisions
- ✅ Provide specific code targets in correct format
- ✅ Quantify assessments with scores (X/5)
- ❌ Do NOT create task lists or implementation steps
- ❌ Do NOT include code examples or snippets
- ❌ Do NOT create project management timelines
## CONTEXT INTEGRATION
### Session Context
- Load context-package.json for task requirements
- Reference workflow-session.json for session state
- Review CLAUDE.md for project standards
### Brainstorm Context
If brainstorming artifacts exist:
- Prioritize individual role analysis.md files
- Use role analysis documents for integrated view
- Reference guidance-specification.md for context
### Codebase Context
- Identify similar patterns in existing code
- Evaluate success/failure of current approaches
- Ensure consistency with project architecture
## EXECUTION MODE
**Mode**: Analysis with write permission for output file
**CLI Tool**: Gemini wrapper with --approval-mode yolo
**Timeout**: 40-60 minutes based on complexity
**Output**: Single file gemini-solution-design.md
## VERIFICATION CHECKLIST ✓
□ context-package.json read and analyzed
□ All 7 required sections present in output
□ 2+ key design decisions with rationale and alternatives
□ Code targets specified in correct format
□ Feasibility scores provided (X/5)
□ Final recommendation (PROCEED/RECONSIDER/REJECT)
□ Output written to .workflow/active/{session_id}/.process/gemini-solution-design.md
Focus: Comprehensive solution design emphasizing architecture decisions and critical insights.

View File

@@ -0,0 +1,286 @@
IMPL_PLAN.md Template - Implementation Plan Document Structure
## Document Frontmatter
```yaml
---
identifier: WFS-{session-id}
source: "User requirements" | "File: path" | "Issue: ISS-001"
analysis: .workflow/active//{session-id}/.process/ANALYSIS_RESULTS.md
artifacts: .workflow/active//{session-id}/.brainstorming/
context_package: .workflow/active//{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"
action_plan_verify: "pending"
phase_progression: "brainstorm → context → analysis → concept_verify → planning" # CCW workflow phases
---
```
## Document Structure
# Implementation Plan: {Project Title}
## 1. Summary
Core requirements, objectives, technical approach summary (2-3 paragraphs max).
**Core Objectives**:
- [Key objective 1]
- [Key objective 2]
**Technical Approach**:
- [High-level approach]
## 2. Context Analysis
### CCW Workflow Context
**Phase Progression**:
- ✅ Phase 1: Brainstorming (role analyses generated)
- ✅ Phase 2: Context Gathering (context-package.json: {N} files, {M} modules analyzed)
- ✅ Phase 3: Enhanced Analysis (ANALYSIS_RESULTS.md: Gemini/Qwen/Codex parallel insights)
- ✅ Phase 4: Concept Verification ({X} clarifications answered, role analyses updated | skipped)
- ⏳ Phase 5: Action Planning (current phase - generating IMPL_PLAN.md)
**Quality Gates**:
- concept-verify: ✅ Passed (0 ambiguities remaining) | ⏭️ Skipped (user decision) | ⏳ Pending
- plan-verify: ⏳ Pending (recommended before /workflow:execute)
**Context Package Summary**:
- **Focus Paths**: {list key directories from context-package.json}
- **Key Files**: {list primary files for modification}
- **Module Depth Analysis**: {from get_modules_by_depth.sh output}
- **Smart Context**: {total file count} files, {module count} modules, {dependency count} dependencies identified
### Project Profile
- **Type**: Greenfield/Enhancement/Refactor
- **Scale**: User count, data volume, complexity
- **Tech Stack**: Primary technologies
- **Timeline**: Duration and milestones
### Module Structure
```
[Directory tree showing key modules]
```
### Dependencies
**Primary**: [Core libraries and frameworks]
**APIs**: [External services]
**Development**: [Testing, linting, CI/CD tools]
### Patterns & Conventions
- **Architecture**: [Key patterns like DI, Event-Driven]
- **Component Design**: [Design patterns]
- **State Management**: [State strategy]
- **Code Style**: [Naming, TypeScript coverage]
## 3. Brainstorming Artifacts Reference
### Artifact Usage Strategy
**Primary Reference (role analyses)**:
- **What**: Role-specific analyses from brainstorming providing multi-perspective insights
- **When**: Every task references relevant role analyses for requirements and design decisions
- **How**: Extract requirements, architecture decisions, UI/UX patterns from applicable role documents
- **Priority**: Collective authoritative source - multiple role perspectives provide comprehensive coverage
- **CCW Value**: Maintains role-specific expertise while enabling cross-role integration during planning
**Context Intelligence (context-package.json)**:
- **What**: Smart context gathered by CCW's context-gather phase
- **Content**: Focus paths, dependency graph, existing patterns, module structure
- **Usage**: Tasks load this via `flow_control.preparatory_steps` for environment setup
- **CCW Value**: Automated intelligent context discovery replacing manual file exploration
**Technical Analysis (ANALYSIS_RESULTS.md)**:
- **What**: Gemini/Qwen/Codex parallel analysis results
- **Content**: Optimization strategies, risk assessment, architecture review, implementation patterns
- **Usage**: Referenced in task planning for technical guidance and risk mitigation
- **CCW Value**: Multi-model parallel analysis providing comprehensive technical intelligence
### Integrated Specifications (Highest Priority)
- **role analyses**: Comprehensive implementation blueprint
- Contains: Architecture design, UI/UX guidelines, functional/non-functional requirements, implementation roadmap, risk assessment
### Supporting Artifacts (Reference)
- **guidance-specification.md**: Role-specific discussion points and analysis framework
- **system-architect/analysis.md**: Detailed architecture specifications
- **ui-designer/analysis.md**: Layout and component specifications
- **product-manager/analysis.md**: Product vision and user stories
**Artifact Priority in Development**:
1. role analyses (primary reference for all tasks)
2. context-package.json (smart context for execution environment)
3. ANALYSIS_RESULTS.md (technical analysis and optimization strategies)
4. Role-specific analyses (fallback for detailed specifications)
## 4. Implementation Strategy
### Execution Strategy
**Execution Model**: [Sequential | Parallel | Phased | TDD Cycles]
**Rationale**: [Why this execution model fits the project]
**Parallelization Opportunities**:
- [List independent workstreams]
**Serialization Requirements**:
- [List critical dependencies]
### Architectural Approach
**Key Architecture Decisions**:
- [ADR references from role analyses]
- [Justification for architecture patterns]
**Integration Strategy**:
- [How modules communicate]
- [State management approach]
### Key Dependencies
**Task Dependency Graph**:
```
[High-level dependency visualization]
```
**Critical Path**: [Identify bottleneck tasks]
### Testing Strategy
**Testing Approach**:
- Unit testing: [Tools, scope]
- Integration testing: [Key integration points]
- E2E testing: [Critical user flows]
**Coverage Targets**:
- Lines: ≥70%
- Functions: ≥70%
- Branches: ≥65%
**Quality Gates**:
- [CI/CD gates]
- [Performance budgets]
## 5. Task Breakdown Summary
### Task Count
**{N} tasks** (flat hierarchy | two-level hierarchy, sequential | parallel execution)
### Task Structure
- **IMPL-1**: [Main task title]
- **IMPL-2**: [Main task title]
...
### Complexity Assessment
- **High**: [List with rationale]
- **Medium**: [List]
- **Low**: [List]
### Dependencies
[Reference Section 4.3 for dependency graph]
**Parallelization Opportunities**:
- [Specific task groups that can run in parallel]
## 6. Implementation Plan (Detailed Phased Breakdown)
### Execution Strategy
**Phase 1 (Weeks 1-2): [Phase Name]**
- **Tasks**: IMPL-1, IMPL-2
- **Deliverables**:
- [Specific deliverable 1]
- [Specific deliverable 2]
- **Success Criteria**:
- [Measurable criterion]
**Phase 2 (Weeks 3-N): [Phase Name]**
...
### Resource Requirements
**Development Team**:
- [Team composition and skills]
**External Dependencies**:
- [Third-party services, APIs]
**Infrastructure**:
- [Development, staging, production environments]
## 7. Risk Assessment & Mitigation
| Risk | Impact | Probability | Mitigation Strategy | Owner |
|------|--------|-------------|---------------------|-------|
| [Risk description] | High/Med/Low | High/Med/Low | [Strategy] | [Role] |
**Critical Risks** (High impact + High probability):
- [Risk 1]: [Detailed mitigation plan]
**Monitoring Strategy**:
- [How risks will be monitored]
## 8. Success Criteria
**Functional Completeness**:
- [ ] All requirements from role analyses implemented
- [ ] All acceptance criteria from task.json files met
**Technical Quality**:
- [ ] Test coverage ≥70%
- [ ] Bundle size within budget
- [ ] Performance targets met
**Operational Readiness**:
- [ ] CI/CD pipeline operational
- [ ] Monitoring and logging configured
- [ ] Documentation complete
**Business Metrics**:
- [ ] [Key business metrics from role analyses]
## Template Usage Guidelines
### When Generating IMPL_PLAN.md
1. **Fill Frontmatter Variables**:
- Replace {session-id} with actual session ID
- Set workflow_type based on planning phase
- Update verification_history based on concept-verify results
2. **Populate CCW Workflow Context**:
- Extract file/module counts from context-package.json
- Document phase progression based on completed workflow steps
- Update quality gate status (passed/skipped/pending)
3. **Extract from Analysis Results**:
- Core objectives from ANALYSIS_RESULTS.md
- Technical approach and architecture decisions
- Risk assessment and mitigation strategies
4. **Reference Brainstorming Artifacts**:
- List detected artifacts with correct paths
- Document artifact priority and usage strategy
- Map artifacts to specific tasks based on domain
5. **Define Implementation Strategy**:
- Choose execution model (sequential/parallel/phased)
- Identify parallelization opportunities
- Document critical path and dependencies
6. **Break Down Tasks**:
- List all task IDs and titles
- Assess complexity (high/medium/low)
- Create dependency graph visualization
7. **Set Success Criteria**:
- Extract from role analyses
- Include measurable metrics
- Define quality gates
### Validation Checklist
Before finalizing IMPL_PLAN.md:
- [ ] All frontmatter fields populated correctly
- [ ] CCW workflow context reflects actual phase progression
- [ ] Brainstorming artifacts correctly referenced
- [ ] Task breakdown matches generated task JSONs
- [ ] Dependencies are acyclic and logical
- [ ] Success criteria are measurable
- [ ] Risk assessment includes mitigation strategies
- [ ] All {placeholder} variables replaced with actual values

View File

@@ -0,0 +1,94 @@
Template for generating conflict-patterns.md
## Purpose
Document recurring conflict patterns across workflow sessions with resolutions.
## File Location
`.claude/skills/workflow-progress/conflict-patterns.md`
## Update Strategy
- **Incremental mode**: Add new conflicts, update frequency counters for existing patterns
- **Full mode**: Regenerate entire conflict analysis from all sessions
## Structure
```markdown
# Workflow Conflict Patterns
## Architecture Conflicts
### {Conflict_Pattern_Title}
**Pattern**: {concise_pattern_description}
**Sessions**: {session_id_1}, {session_id_2}
**Resolution**: {resolution_strategy}
**Code Impact**:
- Modified: {file_path_1}, {file_path_2}
- Added: {file_path_3}
- Tests: {test_file_path}
**Frequency**: {count} sessions
**Severity**: {high|medium|low}
---
## Dependency Conflicts
### {Conflict_Pattern_Title}
**Pattern**: {concise_pattern_description}
**Sessions**: {session_id_list}
**Resolution**: {resolution_strategy}
**Package Changes**:
- Updated: {package_name}@{version}
- Locked: {dependency_name}
**Frequency**: {count} sessions
**Severity**: {high|medium|low}
---
## Testing Conflicts
### {Conflict_Pattern_Title}
...
---
## Performance Conflicts
### {Conflict_Pattern_Title}
...
```
## Data Sources
- IMPL_PLAN summaries: `.workflow/.archives/{session_id}/IMPL_PLAN.md`
- Context packages: `.workflow/.archives/{session_id}/.process/context-package.json` (reference only)
- Session lessons: `manifest.json` -> `archives[].lessons.challenges`
## Conflict Identification (Use CCW CLI)
**Command Pattern**:
```bash
ccw cli -p "
PURPOSE: Identify conflict patterns from workflow sessions
TASK: • Extract conflicts from IMPL_PLAN and lessons • Group by type (architecture/dependencies/testing/performance) • Identify recurring patterns (same conflict in different sessions) • Link resolutions to specific sessions
MODE: analysis
CONTEXT: @.workflow/.archives/*/IMPL_PLAN.md @.workflow/.archives/manifest.json
EXPECTED: Conflict patterns with frequency and resolution
CONSTRAINTS: analysis=READ-ONLY
" --tool gemini --mode analysis --rule workflow-skill-aggregation --cd .workflow/.archives
```
**Pattern Grouping**:
- **Architecture**: Design conflicts, incompatible strategies, interface mismatches
- **Dependencies**: Version conflicts, library incompatibilities, package issues
- **Testing**: Mock data inconsistencies, test environment issues, coverage gaps
- **Performance**: Bottlenecks, optimization conflicts, resource issues
## Formatting Rules
- Sort by frequency within each category
- Include code impact for traceability
- Mark high-frequency patterns (3+ sessions) as "RECURRING"
- Keep resolution descriptions actionable
- Use relative paths for file references

View File

@@ -0,0 +1,94 @@
Template for generating lessons-learned.md
## Purpose
Aggregate lessons learned from workflow sessions, categorized by functional domain and severity.
## File Location
`.claude/skills/workflow-progress/lessons-learned.md`
## Update Strategy
- **Incremental mode**: Merge new session lessons into existing categories, update frequencies
- **Full mode**: Regenerate entire lessons document from all sessions
## Structure
```markdown
# Workflow Lessons Learned
## Best Practices (Successes)
### {Domain_Category}
- {success_pattern_1} (sessions: {session_id_1}, {session_id_2})
- {success_pattern_2} (sessions: {session_id_3})
### {Domain_Category_2}
...
---
## Known Challenges
### High Priority
- **{challenge_title}**: {description}
- Affected sessions: {session_id_1}, {session_id_2}
- Resolution: {resolution_strategy}
### Medium Priority
- **{challenge_title}**: {description}
- Affected sessions: {session_id_3}
- Resolution: {resolution_strategy}
### Low Priority
...
---
## Watch Patterns
### Critical (3+ sessions)
1. **{pattern_name}**: {description}
- Frequency: {count} sessions
- Affected: {session_list}
- Mitigation: {mitigation_strategy}
### High Priority (2 sessions)
...
### Normal (1 session)
...
```
## Data Sources
- Lessons: `manifest.json` -> `archives[].lessons.{successes|challenges|watch_patterns}`
- Session metadata: `.workflow/.archives/{session_id}/workflow-session.json`
## Aggregation Rules (Use CCW CLI)
**Command Pattern**:
```bash
ccw cli -p "
PURPOSE: Aggregate workflow lessons from session data
TASK: • Group successes by functional domain • Categorize challenges by severity (HIGH/MEDIUM/LOW) • Identify watch patterns with frequency >= 2 • Mark CRITICAL patterns (3+ sessions)
MODE: analysis
CONTEXT: @.workflow/.archives/manifest.json
EXPECTED: Aggregated lessons with frequency counts
CONSTRAINTS: analysis=READ-ONLY
" --tool gemini --mode analysis --rule workflow-skill-aggregation --cd .workflow/.archives
```
**Severity Classification**:
- **HIGH**: Blocked development >4 hours OR repeated in 3+ sessions
- **MEDIUM**: Required significant rework OR repeated in 2 sessions
- **LOW**: Minor issues resolved quickly
**Pattern Identification**:
- Successes in 3+ sessions → "Best Practices"
- Challenges repeated 2+ times → "Known Issues"
- Watch patterns frequency >= 2 → "High Priority Warnings"
- Watch patterns frequency >= 3 → "CRITICAL"
## Formatting Rules
- Sort by frequency (most common first)
- Include session references for traceability
- Use bold for challenge titles
- Keep descriptions concise but actionable

View File

@@ -0,0 +1,119 @@
# Analysis Mode Protocol
## Mode Definition
**Mode**: `analysis` (READ-ONLY)
## Prompt Structure
```
PURPOSE: [development goal]
TASK: [specific implementation task]
MODE: [auto|write]
CONTEXT: [file patterns]
EXPECTED: [deliverables]
RULES: [templates | additional constraints]
```
## Operation Boundaries
### ALLOWED Operations
- **READ**: All CONTEXT files and analyze content
- **ANALYZE**: Code patterns, architecture, dependencies
- **GENERATE**: Text output, insights, recommendations
- **DOCUMENT**: Analysis results in output response only
### FORBIDDEN Operations
- **NO FILE CREATION**: Cannot create any files on disk
- **NO FILE MODIFICATION**: Cannot modify existing files
- **NO FILE DELETION**: Cannot delete any files
- **NO DIRECTORY OPERATIONS**: Cannot create/modify directories
**CRITICAL**: Absolutely NO file system operations - OUTPUT ONLY
## Execution Flow
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
2. **Read** and analyze CONTEXT files thoroughly
3. **Identify** patterns, issues, and dependencies
4. **Generate** insights and recommendations
5. **Validate** EXPECTED deliverables met
6. **Output** structured analysis (text response only)
## Core Requirements
**ALWAYS**:
- Analyze ALL CONTEXT files completely
- Apply RULES (templates + constraints) exactly
- Provide code evidence with `file:line` references
- List all related/analyzed files at output beginning
- Match EXPECTED deliverables precisely
**NEVER**:
- Assume behavior without code verification
- Ignore CONTEXT file patterns
- Skip RULES or templates
- Make unsubstantiated claims
- Create/modify/delete any files
## RULES Processing
- Parse RULES field to extract template content and constraints
- Recognize `|` as separator: `template content | additional constraints`
- Apply ALL template guidelines as mandatory
- Treat rule violations as task failures
## Error Handling
**File Not Found**: Report missing files, continue with available, note in output
**Invalid CONTEXT Pattern**: Report invalid pattern, request correction, do not guess
## Quality Standards
- **Thoroughness**: Analyze ALL files, check cross-file patterns, quantify metrics
- **Evidence-Based**: Quote code with `file:line`, link patterns, support claims with examples
- **Actionable**: Clear recommendations, prioritized by impact, incremental changes
---
## Output Format
### Format Priority
**If template defines output format** → Follow template format EXACTLY
**If template has no format** → Use default format below
### Default Analysis Output
```markdown
# Analysis: [TASK Title]
## Related Files
- `path/to/file1.ext` - [Brief description of relevance]
- `path/to/file2.ext` - [Brief description of relevance]
## Summary
[2-3 sentence overview]
## Key Findings
1. [Finding] - path/to/file:123
2. [Finding] - path/to/file:456
## Detailed Analysis
[Evidence-based analysis with code quotes]
## Recommendations
1. [Actionable recommendation]
2. [Actionable recommendation]
```
### Code References
**Format**: `path/to/file:line_number`
**Example**: `src/auth/jwt.ts:45` - Authentication uses deprecated algorithm
### Quality Checklist
- [ ] All CONTEXT files analyzed
- [ ] Code evidence with `file:line` references
- [ ] Specific, actionable recommendations
- [ ] No unsubstantiated claims
- [ ] EXPECTED deliverables met

View File

@@ -0,0 +1,136 @@
# Write Mode Protocol
## Prompt Structure
```
PURPOSE: [development goal]
TASK: [specific implementation task]
MODE: [auto|write]
CONTEXT: [file patterns]
EXPECTED: [deliverables]
RULES: [templates | additional constraints]
```
## Operation Boundaries
### MODE: write
- **READ**: All CONTEXT files and analyze content
- **CREATE**: New files (documentation, code, configuration)
- **MODIFY**: Existing files (update content, refactor code)
- **DELETE**: Files when explicitly required
**Restrictions**: Follow project conventions, cannot break existing functionality
**Constraint**: Must test every change
## Execution Flow
### MODE: write
1. **Parse** all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
2. **Read** CONTEXT files, find 3+ similar patterns
3. **Plan** implementation following RULES
4. **Execute** requested file operations
5. **Validate** changes
6. **Report** file changes
## Core Requirements
**ALWAYS**:
- Study CONTEXT files - find 3+ similar patterns before implementing
- Apply RULES exactly
- Test continuously (auto mode)
- Commit incrementally (auto mode)
- Match project style exactly
- List all created/modified files at output beginning
**NEVER**:
- Make assumptions without code verification
- Ignore existing patterns
- Skip tests (auto mode)
- Use clever tricks over boring solutions
- Break backward compatibility
- Exceed 3 failed attempts without stopping
**Three-Attempt Rule**: On 3rd failure, stop and report what attempted, what failed, root cause
| Error Type | Response |
|------------|----------|
| Syntax/Type | Review → Fix → Re-run tests |
| Runtime | Analyze stack → Add handling → Test |
| Test Failure | Debug → Review setup → Fix |
| Build Failure | Check messages → Fix incrementally |
---
## Output Format
### Format Priority
**If template defines output format** → Follow template format EXACTLY
**If template has no format** → Use default format below
### Task Implementation
```markdown
# Implementation: [TASK Title]
## Changes
- Created: `path/to/file1.ext` (X lines)
- Modified: `path/to/file2.ext` (+Y/-Z lines)
- Deleted: `path/to/file3.ext`
## Summary
[2-3 sentence overview]
## Key Decisions
1. [Decision] - Rationale and reference to similar pattern
2. [Decision] - path/to/reference:line
## Implementation Details
[Evidence-based description with code references]
## Testing
- Tests written: X new tests
- Tests passing: Y/Z tests
## Validation
✅ Tests: X passing
✅ Build: Success
## Next Steps
[Recommendations if any]
```
### Partial Completion
```markdown
# Task Status: Partially Completed
## Completed
- [What worked]
- Files: `path/to/completed.ext`
## Blocked
- **Issue**: [What failed]
- **Root Cause**: [Analysis]
- **Attempted**: [Solutions tried - attempt X of 3]
## Required
[What's needed to proceed]
## Recommendation
[Suggested next steps]
```
### Code References
**Format**: `path/to/file:line_number`
**Example**: `src/auth/jwt.ts:45` - Implemented following pattern from `src/auth/session.ts:78`
### Quality Checklist
- [ ] All tests pass
- [ ] Build succeeds
- [ ] All EXPECTED deliverables met
- [ ] Code follows existing patterns
- [ ] File changes listed at beginning

View File

@@ -0,0 +1,151 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Conflict Resolution Schema",
"description": "Schema for conflict detection, strategy generation, and resolution output",
"type": "object",
"required": ["conflicts", "summary"],
"properties": {
"conflicts": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "brief", "severity", "category", "strategies", "recommended"],
"properties": {
"id": {
"type": "string",
"pattern": "^CON-\\d{3}$",
"description": "Conflict ID (CON-001, CON-002, ...)"
},
"brief": {
"type": "string",
"description": "一句话冲突摘要(中文)"
},
"severity": {
"enum": ["Critical", "High", "Medium"],
"description": "冲突严重程度"
},
"category": {
"enum": ["Architecture", "API", "Data", "Dependency", "ModuleOverlap"],
"description": "冲突类型"
},
"affected_files": {
"type": "array",
"items": { "type": "string" },
"description": "受影响的文件路径"
},
"description": {
"type": "string",
"description": "详细冲突描述"
},
"impact": {
"type": "object",
"properties": {
"scope": { "type": "string", "description": "影响的模块/组件" },
"compatibility": { "enum": ["Yes", "No", "Partial"] },
"migration_required": { "type": "boolean" },
"estimated_effort": { "type": "string", "description": "人天估计" }
}
},
"overlap_analysis": {
"type": "object",
"description": "仅当 category=ModuleOverlap 时需要",
"properties": {
"new_module": {
"type": "object",
"properties": {
"name": { "type": "string" },
"scenarios": { "type": "array", "items": { "type": "string" } },
"responsibilities": { "type": "string" }
}
},
"existing_modules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": { "type": "string" },
"name": { "type": "string" },
"scenarios": { "type": "array", "items": { "type": "string" } },
"overlap_scenarios": { "type": "array", "items": { "type": "string" } },
"responsibilities": { "type": "string" }
}
}
}
}
},
"strategies": {
"type": "array",
"minItems": 2,
"maxItems": 4,
"items": {
"type": "object",
"required": ["name", "approach", "complexity", "risk", "effort", "pros", "cons"],
"properties": {
"name": { "type": "string", "description": "策略名称(中文)" },
"approach": { "type": "string", "description": "实现方法简述" },
"complexity": { "enum": ["Low", "Medium", "High"] },
"risk": { "enum": ["Low", "Medium", "High"] },
"effort": { "type": "string", "description": "时间估计" },
"pros": { "type": "array", "items": { "type": "string" }, "description": "优点" },
"cons": { "type": "array", "items": { "type": "string" }, "description": "缺点" },
"clarification_needed": {
"type": "array",
"items": { "type": "string" },
"description": "需要用户澄清的问题(尤其是 ModuleOverlap"
},
"modifications": {
"type": "array",
"items": {
"type": "object",
"required": ["file", "section", "change_type", "old_content", "new_content", "rationale"],
"properties": {
"file": { "type": "string", "description": "相对项目根目录的完整路径" },
"section": { "type": "string", "description": "Markdown heading 用于定位" },
"change_type": { "enum": ["update", "add", "remove"] },
"old_content": { "type": "string", "description": "原始内容片段20-100字符用于唯一匹配" },
"new_content": { "type": "string", "description": "修改后的内容" },
"rationale": { "type": "string", "description": "修改理由" }
}
}
}
}
}
},
"recommended": {
"type": "integer",
"minimum": 0,
"description": "推荐策略索引0-based"
},
"modification_suggestions": {
"type": "array",
"minItems": 2,
"maxItems": 5,
"items": { "type": "string" },
"description": "自定义处理建议2-5条中文"
}
}
}
},
"summary": {
"type": "object",
"required": ["total", "critical", "high", "medium"],
"properties": {
"total": { "type": "integer" },
"critical": { "type": "integer" },
"high": { "type": "integer" },
"medium": { "type": "integer" }
}
}
},
"_quality_standards": {
"modifications": [
"old_content: 20-100字符确保 Edit 工具能唯一匹配",
"new_content: 保持 markdown 格式",
"change_type: update(替换), add(插入), remove(删除)"
],
"user_facing_text": "brief, name, pros, cons, modification_suggestions 使用中文",
"technical_fields": "severity, category, complexity, risk 使用英文"
}
}

View File

@@ -0,0 +1,127 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Debug Log Entry Schema",
"description": "NDJSON log entry for hypothesis-driven debugging workflow",
"type": "object",
"required": [
"sessionId",
"runId",
"hypothesisId",
"location",
"message",
"data",
"timestamp"
],
"properties": {
"sessionId": {
"type": "string",
"pattern": "^DBG-[a-z0-9-]+-\\d{4}-\\d{2}-\\d{2}$",
"description": "Debug session identifier (e.g., 'DBG-stack-length-not-found-2025-12-18')"
},
"runId": {
"type": "string",
"pattern": "^run-\\d+$",
"description": "Reproduction run number (e.g., 'run-1', 'run-2')"
},
"hypothesisId": {
"type": "string",
"pattern": "^H\\d+$",
"description": "Hypothesis identifier being tested (e.g., 'H1', 'H2')"
},
"location": {
"type": "string",
"description": "Code location in format 'file:function:line' or 'file:line'"
},
"message": {
"type": "string",
"description": "Human-readable description of what's being logged"
},
"data": {
"type": "object",
"additionalProperties": true,
"description": "Captured values for hypothesis validation",
"properties": {
"keys_sample": {
"type": "array",
"items": {"type": "string"},
"description": "Sample of dictionary/object keys (first 30)"
},
"value": {
"description": "Captured value (any type)"
},
"expected_value": {
"description": "Expected value for comparison"
},
"actual_type": {
"type": "string",
"description": "Actual type of captured value"
},
"count": {
"type": "integer",
"description": "Count of items (for arrays/collections)"
},
"is_null": {
"type": "boolean",
"description": "Whether value is null/None"
},
"is_empty": {
"type": "boolean",
"description": "Whether collection is empty"
},
"comparison_result": {
"type": "string",
"enum": ["match", "mismatch", "partial_match"],
"description": "Result of value comparison"
}
}
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
},
"severity": {
"type": "string",
"enum": ["debug", "info", "warning", "error"],
"default": "info",
"description": "Log severity level"
},
"stack_trace": {
"type": "string",
"description": "Stack trace if capturing exception context"
},
"parent_entry_id": {
"type": "string",
"description": "Reference to parent log entry for nested contexts"
}
},
"examples": [
{
"sessionId": "DBG-stack-length-not-found-2025-12-18",
"runId": "run-1",
"hypothesisId": "H1",
"location": "rmxprt_api/core/rmxprt_parameter.py:sync_from_machine:642",
"message": "Inspect stator keys from machine.to_dict and compare Stack Length vs Length",
"data": {
"keys_sample": ["Length", "Outer Diameter", "Inner Diameter", "Slot"],
"stack_length_value": "未找到",
"length_value": "120mm",
"comparison_result": "mismatch"
},
"timestamp": 1734523456789
},
{
"sessionId": "DBG-registered-zero-2025-12-18",
"runId": "run-1",
"hypothesisId": "H2",
"location": "rmxprt_api/utils/param_core.py:update_variables_from_result_model:670",
"message": "Check result parameters count and sample keys",
"data": {
"count": 0,
"is_empty": true,
"sections_parsed": ["Stator", "Rotor", "General"],
"expected_count": 145
},
"timestamp": 1734523457123
}
]
}

View File

@@ -0,0 +1,234 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Diagnosis Context Schema",
"description": "Bug diagnosis results from cli-explore-agent for root cause analysis",
"type": "object",
"required": [
"symptom",
"root_cause",
"affected_files",
"reproduction_steps",
"fix_hints",
"dependencies",
"constraints",
"clarification_needs",
"_metadata"
],
"properties": {
"symptom": {
"type": "object",
"required": ["description", "error_message"],
"properties": {
"description": {
"type": "string",
"description": "Human-readable description of the bug symptoms"
},
"error_message": {
"type": ["string", "null"],
"description": "Exact error message if available, null if no specific error"
},
"stack_trace": {
"type": ["string", "null"],
"description": "Stack trace excerpt if available"
},
"frequency": {
"type": "string",
"enum": ["always", "intermittent", "rare", "unknown"],
"description": "How often the bug occurs"
},
"user_impact": {
"type": "string",
"description": "How the bug affects end users"
}
},
"description": "Observable symptoms and error manifestation"
},
"root_cause": {
"type": "object",
"required": ["file", "issue", "confidence"],
"properties": {
"file": {
"type": "string",
"description": "File path where the root cause is located"
},
"line_range": {
"type": "string",
"description": "Line range containing the bug (e.g., '45-60')"
},
"function": {
"type": "string",
"description": "Function or method name containing the bug"
},
"issue": {
"type": "string",
"description": "Description of what's wrong in the code"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score 0.0-1.0 (0.8+ high, 0.5-0.8 medium, <0.5 low)"
},
"introduced_by": {
"type": "string",
"description": "Commit hash or date when bug was introduced (if known)"
},
"category": {
"type": "string",
"enum": ["logic_error", "edge_case", "race_condition", "null_reference", "type_mismatch", "resource_leak", "validation", "integration", "configuration", "other"],
"description": "Bug category classification"
}
},
"description": "Root cause analysis with confidence score"
},
"affected_files": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"required": ["path", "relevance"],
"properties": {
"path": {"type": "string", "description": "File path relative to project root"},
"relevance": {"type": "number", "minimum": 0, "maximum": 1, "description": "Relevance score 0.0-1.0 (0.7+ high, 0.5-0.7 medium, <0.5 low)"},
"rationale": {"type": "string", "description": "Brief explanation of why this file is affected from this diagnosis angle"},
"change_type": {
"type": "string",
"enum": ["fix_target", "needs_update", "test_coverage", "reference_only"],
"description": "Type of change needed for this file"
}
}
}
]
},
"description": "Files affected by the bug. Prefer object format with relevance scores for synthesis prioritization."
},
"reproduction_steps": {
"type": "array",
"items": {"type": "string"},
"minItems": 1,
"description": "Step-by-step instructions to reproduce the bug"
},
"fix_hints": {
"type": "array",
"items": {
"type": "object",
"required": ["description", "approach"],
"properties": {
"description": {
"type": "string",
"description": "What needs to be fixed"
},
"approach": {
"type": "string",
"description": "Suggested fix approach with specific guidance"
},
"code_example": {
"type": "string",
"description": "Example code snippet showing the fix pattern"
},
"risk": {
"type": "string",
"enum": ["low", "medium", "high"],
"description": "Risk level of implementing this fix"
}
}
},
"description": "Actionable fix suggestions from this diagnosis angle"
},
"dependencies": {
"type": "string",
"description": "External and internal dependencies relevant to the bug"
},
"constraints": {
"type": "string",
"description": "Technical constraints and limitations affecting the fix"
},
"related_issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["similar_bug", "regression", "related_feature", "tech_debt"],
"description": "Relationship type"
},
"reference": {
"type": "string",
"description": "Issue ID, commit hash, or file reference"
},
"description": {
"type": "string",
"description": "Brief description of the relationship"
}
}
},
"description": "Related issues, regressions, or similar bugs found during diagnosis"
},
"clarification_needs": {
"type": "array",
"items": {
"type": "object",
"required": ["question", "context", "options"],
"properties": {
"question": {
"type": "string",
"description": "The clarification question to ask user"
},
"context": {
"type": "string",
"description": "Background context explaining why this clarification is needed"
},
"options": {
"type": "array",
"items": {"type": "string"},
"description": "Available options for user to choose from (2-4 options)"
}
}
},
"description": "Ambiguities requiring user input before fix planning"
},
"_metadata": {
"type": "object",
"required": ["timestamp", "bug_description", "source"],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of diagnosis"
},
"bug_description": {
"type": "string",
"description": "Original bug description that triggered diagnosis"
},
"source": {
"type": "string",
"const": "cli-explore-agent",
"description": "Agent that performed diagnosis"
},
"diagnosis_angle": {
"type": "string",
"description": "Diagnosis angle (e.g., 'error-handling', 'dataflow', 'state-management')"
},
"diagnosis_index": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Diagnosis index (1-4) in parallel diagnosis set"
},
"total_diagnoses": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Total number of parallel diagnoses"
},
"duration_seconds": {
"type": "integer",
"description": "Diagnosis duration in seconds"
}
}
}
}
}

View File

@@ -0,0 +1,219 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "discovery-finding-schema",
"title": "Discovery Finding Schema",
"description": "Schema for perspective-based issue discovery results",
"type": "object",
"required": ["perspective", "discovery_id", "analysis_timestamp", "cli_tool_used", "summary", "findings"],
"properties": {
"perspective": {
"type": "string",
"enum": ["bug", "ux", "test", "quality", "security", "performance", "maintainability", "best-practices"],
"description": "Discovery perspective"
},
"discovery_id": {
"type": "string",
"pattern": "^DSC-\\d{8}-\\d{6}$",
"description": "Parent discovery session ID"
},
"analysis_timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of analysis"
},
"cli_tool_used": {
"type": "string",
"enum": ["gemini", "qwen", "codex"],
"description": "CLI tool that performed the analysis"
},
"model": {
"type": "string",
"description": "Specific model version used",
"examples": ["gemini-2.5-pro", "qwen-max"]
},
"analysis_duration_ms": {
"type": "integer",
"minimum": 0,
"description": "Analysis duration in milliseconds"
},
"summary": {
"type": "object",
"required": ["total_findings"],
"properties": {
"total_findings": { "type": "integer", "minimum": 0 },
"critical": { "type": "integer", "minimum": 0 },
"high": { "type": "integer", "minimum": 0 },
"medium": { "type": "integer", "minimum": 0 },
"low": { "type": "integer", "minimum": 0 },
"files_analyzed": { "type": "integer", "minimum": 0 }
},
"description": "Summary statistics (FLAT structure, NOT nested)"
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "title", "perspective", "priority", "category", "description", "file", "line"],
"properties": {
"id": {
"type": "string",
"pattern": "^dsc-[a-z]+-\\d{3}-[a-f0-9]{8}$",
"description": "Unique finding ID: dsc-{perspective}-{seq}-{uuid8}",
"examples": ["dsc-bug-001-a1b2c3d4"]
},
"title": {
"type": "string",
"minLength": 10,
"maxLength": 200,
"description": "Concise finding title"
},
"perspective": {
"type": "string",
"enum": ["bug", "ux", "test", "quality", "security", "performance", "maintainability", "best-practices"]
},
"priority": {
"type": "string",
"enum": ["critical", "high", "medium", "low"],
"description": "Priority level (lowercase only)"
},
"category": {
"type": "string",
"description": "Perspective-specific category",
"examples": ["null-check", "edge-case", "missing-test", "complexity", "injection"]
},
"description": {
"type": "string",
"minLength": 20,
"description": "Detailed description of the finding"
},
"file": {
"type": "string",
"description": "File path relative to project root"
},
"line": {
"type": "integer",
"minimum": 1,
"description": "Line number of the finding"
},
"snippet": {
"type": "string",
"description": "Relevant code snippet"
},
"suggested_issue": {
"type": "object",
"required": ["title", "type", "priority"],
"properties": {
"title": {
"type": "string",
"description": "Suggested issue title for export"
},
"type": {
"type": "string",
"enum": ["bug", "feature", "enhancement", "refactor", "test", "docs"],
"description": "Issue type"
},
"priority": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Priority 1-5 (1=critical, 5=low)"
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Suggested tags for the issue"
}
},
"description": "Pre-filled issue suggestion for export"
},
"external_reference": {
"type": ["object", "null"],
"properties": {
"source": { "type": "string" },
"url": { "type": "string", "format": "uri" },
"relevance": { "type": "string" }
},
"description": "External reference from Exa research (if applicable)"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score 0.0-1.0"
},
"impact": {
"type": "string",
"description": "Description of potential impact"
},
"recommendation": {
"type": "string",
"description": "Specific recommendation to address the finding"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "Additional metadata (CWE ID, OWASP category, etc.)"
}
}
},
"description": "Array of discovered findings"
},
"cross_references": {
"type": "array",
"items": {
"type": "object",
"properties": {
"finding_id": { "type": "string" },
"related_perspectives": {
"type": "array",
"items": { "type": "string" }
},
"reason": { "type": "string" }
}
},
"description": "Cross-references to findings in other perspectives"
}
},
"examples": [
{
"perspective": "bug",
"discovery_id": "DSC-20250128-143022",
"analysis_timestamp": "2025-01-28T14:35:00Z",
"cli_tool_used": "gemini",
"model": "gemini-2.5-pro",
"analysis_duration_ms": 45000,
"summary": {
"total_findings": 8,
"critical": 1,
"high": 2,
"medium": 3,
"low": 2,
"files_analyzed": 5
},
"findings": [
{
"id": "dsc-bug-001-a1b2c3d4",
"title": "Missing null check in user validation",
"perspective": "bug",
"priority": "high",
"category": "null-check",
"description": "User object is accessed without null check after database query, which may fail if user doesn't exist",
"file": "src/auth/validator.ts",
"line": 45,
"snippet": "const user = await db.findUser(id);\nreturn user.email; // user may be null",
"suggested_issue": {
"title": "Add null check in user validation",
"type": "bug",
"priority": 2,
"tags": ["bug", "auth"]
},
"external_reference": null,
"confidence": 0.85,
"impact": "Runtime error when user not found",
"recommendation": "Add null check: if (!user) throw new NotFoundError('User not found');"
}
],
"cross_references": []
}
]
}

View File

@@ -0,0 +1,125 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "discovery-state-schema",
"title": "Discovery State Schema (Merged)",
"description": "Unified schema for issue discovery session (state + progress merged)",
"type": "object",
"required": ["discovery_id", "target_pattern", "phase", "created_at"],
"properties": {
"discovery_id": {
"type": "string",
"description": "Unique discovery session ID",
"pattern": "^DSC-\\d{8}-\\d{6}$",
"examples": ["DSC-20250128-143022"]
},
"target_pattern": {
"type": "string",
"description": "File/directory pattern being analyzed",
"examples": ["src/auth/**", "codex-lens/**/*.py"]
},
"phase": {
"type": "string",
"enum": ["initialization", "parallel", "aggregation", "complete"],
"description": "Current execution phase"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"target": {
"type": "object",
"description": "Target module information",
"properties": {
"files_count": {
"type": "object",
"properties": {
"source": { "type": "integer" },
"tests": { "type": "integer" },
"total": { "type": "integer" }
}
},
"project": {
"type": "object",
"properties": {
"name": { "type": "string" },
"version": { "type": "string" }
}
}
}
},
"perspectives": {
"type": "array",
"description": "Perspective analysis status (merged from progress)",
"items": {
"type": "object",
"required": ["name", "status"],
"properties": {
"name": {
"type": "string",
"enum": ["bug", "ux", "test", "quality", "security", "performance", "maintainability", "best-practices"]
},
"status": {
"type": "string",
"enum": ["pending", "in_progress", "completed", "failed"]
},
"findings": {
"type": "integer",
"minimum": 0
}
}
}
},
"external_research": {
"type": "object",
"properties": {
"enabled": { "type": "boolean", "default": false },
"completed": { "type": "boolean", "default": false }
}
},
"results": {
"type": "object",
"description": "Aggregated results (final phase)",
"properties": {
"total_findings": { "type": "integer", "minimum": 0 },
"issues_generated": { "type": "integer", "minimum": 0 },
"priority_distribution": {
"type": "object",
"properties": {
"critical": { "type": "integer" },
"high": { "type": "integer" },
"medium": { "type": "integer" },
"low": { "type": "integer" }
}
}
}
}
},
"examples": [
{
"discovery_id": "DSC-20251228-182237",
"target_pattern": "codex-lens/**/*.py",
"phase": "complete",
"created_at": "2025-12-28T18:22:37+08:00",
"updated_at": "2025-12-28T18:35:00+08:00",
"target": {
"files_count": { "source": 48, "tests": 44, "total": 93 },
"project": { "name": "codex-lens", "version": "0.1.0" }
},
"perspectives": [
{ "name": "bug", "status": "completed", "findings": 15 },
{ "name": "test", "status": "completed", "findings": 11 },
{ "name": "quality", "status": "completed", "findings": 12 }
],
"external_research": { "enabled": false, "completed": false },
"results": {
"total_findings": 37,
"issues_generated": 15,
"priority_distribution": { "critical": 4, "high": 13, "medium": 16, "low": 6 }
}
}
]
}

View File

@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Exploration Context Schema",
"description": "Code exploration results from cli-explore-agent for task context gathering",
"type": "object",
"required": [
"project_structure",
"relevant_files",
"patterns",
"dependencies",
"integration_points",
"constraints",
"clarification_needs",
"_metadata"
],
"properties": {
"project_structure": {
"type": "string",
"description": "Overall architecture description: module organization, layer structure, component relationships"
},
"relevant_files": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{
"type": "object",
"required": ["path", "relevance"],
"properties": {
"path": {"type": "string", "description": "File path relative to project root"},
"relevance": {"type": "number", "minimum": 0, "maximum": 1, "description": "Relevance score 0.0-1.0 (0.7+ high, 0.5-0.7 medium, <0.5 low)"},
"rationale": {"type": "string", "description": "Brief explanation of why this file is relevant from this exploration angle"}
}
}
]
},
"description": "File paths to be modified or referenced for the task. Prefer object format with relevance scores for synthesis prioritization."
},
"patterns": {
"type": "string",
"description": "Existing code patterns, conventions, and styles found in the codebase"
},
"dependencies": {
"type": "string",
"description": "External and internal module dependencies relevant to the task"
},
"integration_points": {
"type": "string",
"description": "Where this task connects with existing code: APIs, hooks, events, shared state"
},
"constraints": {
"type": "string",
"description": "Technical constraints and limitations affecting implementation"
},
"clarification_needs": {
"type": "array",
"items": {
"type": "object",
"required": ["question", "context", "options"],
"properties": {
"question": {
"type": "string",
"description": "The clarification question to ask user"
},
"context": {
"type": "string",
"description": "Background context explaining why this clarification is needed"
},
"options": {
"type": "array",
"items": {"type": "string"},
"description": "Available options for user to choose from (2-4 options)"
},
"recommended": {
"type": "integer",
"minimum": 0,
"description": "Zero-based index of recommended option in the options array. Based on codebase patterns and best practices analysis."
}
}
},
"description": "Ambiguities requiring user input before planning"
},
"_metadata": {
"type": "object",
"required": ["timestamp", "task_description", "source"],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of exploration"
},
"task_description": {
"type": "string",
"description": "Original task description that triggered exploration"
},
"source": {
"type": "string",
"const": "cli-explore-agent",
"description": "Agent that performed exploration"
},
"exploration_angle": {
"type": "string",
"description": "Agent-chosen exploration angle (e.g., 'architecture', 'security', 'dataflow')"
},
"exploration_index": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Exploration index (1-4) in parallel exploration set"
},
"total_explorations": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Total number of parallel explorations"
},
"duration_seconds": {
"type": "integer",
"description": "Exploration duration in seconds"
}
}
}
}
}

View File

@@ -0,0 +1,298 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Fix Plan Schema",
"description": "Bug fix plan from cli-lite-planning-agent or direct planning",
"type": "object",
"required": [
"summary",
"root_cause",
"strategy",
"tasks",
"estimated_time",
"recommended_execution",
"severity",
"risk_level",
"_metadata"
],
"properties": {
"summary": {
"type": "string",
"description": "2-3 sentence overview of the fix plan"
},
"root_cause": {
"type": "string",
"description": "Consolidated root cause statement from all diagnoses"
},
"strategy": {
"type": "string",
"enum": ["immediate_patch", "comprehensive_fix", "refactor"],
"description": "Fix strategy: immediate_patch (minimal change), comprehensive_fix (proper solution), refactor (structural improvement)"
},
"tasks": {
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "object",
"required": ["id", "title", "scope", "action", "description", "implementation", "verification"],
"properties": {
"id": {
"type": "string",
"pattern": "^FIX[0-9]+$",
"description": "Task identifier (FIX1, FIX2, FIX3...)"
},
"title": {
"type": "string",
"description": "Task title (action verb + target, e.g., 'Fix token validation edge case')"
},
"scope": {
"type": "string",
"description": "Task scope: module path (src/auth/), feature name, or single file. Prefer module level."
},
"file": {
"type": "string",
"description": "Primary file (deprecated, use scope + modification_points instead)"
},
"action": {
"type": "string",
"enum": ["Fix", "Update", "Refactor", "Add", "Delete", "Configure"],
"description": "Primary action type"
},
"description": {
"type": "string",
"description": "What to fix (1-2 sentences)"
},
"modification_points": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["file", "target", "change"],
"properties": {
"file": {
"type": "string",
"description": "File path within scope"
},
"target": {
"type": "string",
"description": "Function/class/line range (e.g., 'validateToken:45-60')"
},
"change": {
"type": "string",
"description": "Brief description of change"
}
}
},
"description": "All modification points for this fix task. Group related changes into one task."
},
"implementation": {
"type": "array",
"items": {"type": "string"},
"minItems": 2,
"maxItems": 5,
"description": "Step-by-step fix implementation guide"
},
"verification": {
"type": "array",
"items": {"type": "string"},
"minItems": 1,
"maxItems": 3,
"description": "Verification/test criteria to confirm fix works"
},
"reference": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Pattern name to follow"
},
"files": {
"type": "array",
"items": {"type": "string"},
"description": "Reference file paths to study"
},
"examples": {
"type": "string",
"description": "Specific guidance or example references"
}
},
"description": "Reference materials for fix implementation (optional)"
},
"depends_on": {
"type": "array",
"items": {
"type": "string",
"pattern": "^FIX[0-9]+$"
},
"description": "Task IDs this task depends on (e.g., ['FIX1'])"
},
"risk": {
"type": "string",
"enum": ["low", "medium", "high"],
"description": "Risk level of this specific fix task"
},
"cli_execution_id": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$",
"description": "Fixed CLI execution ID for this fix task (e.g., 'session-FIX1', 'bugfix-001-diagnosis')"
},
"cli_execution": {
"type": "object",
"properties": {
"strategy": {
"type": "string",
"enum": ["new", "resume", "fork", "merge_fork"],
"description": "CLI execution strategy: new (no deps), resume (1 dep, continue), fork (1 dep, branch), merge_fork (N deps, combine)"
},
"resume_from": {
"type": "string",
"description": "Parent task's cli_execution_id (for resume/fork strategies)"
},
"merge_from": {
"type": "array",
"items": {"type": "string"},
"description": "Multiple parents' cli_execution_ids (for merge_fork strategy)"
}
},
"description": "CLI execution strategy based on task dependencies"
}
}
},
"description": "Structured fix task breakdown (1-5 tasks)"
},
"flow_control": {
"type": "object",
"properties": {
"execution_order": {
"type": "array",
"items": {
"type": "object",
"properties": {
"phase": {
"type": "string",
"description": "Phase name (e.g., 'parallel-1', 'sequential-1')"
},
"tasks": {
"type": "array",
"items": {"type": "string"},
"description": "Task IDs in this phase"
},
"type": {
"type": "string",
"enum": ["parallel", "sequential"],
"description": "Execution type"
}
}
},
"description": "Ordered execution phases"
},
"exit_conditions": {
"type": "object",
"properties": {
"success": {
"type": "string",
"description": "Condition for successful fix completion"
},
"failure": {
"type": "string",
"description": "Condition that indicates fix failure"
}
},
"description": "Conditions for fix workflow termination"
}
},
"description": "Execution flow control (optional, auto-inferred from depends_on if not provided)"
},
"focus_paths": {
"type": "array",
"items": {"type": "string"},
"description": "Key file paths affected by this fix (aggregated from tasks)"
},
"test_strategy": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": ["unit", "integration", "e2e", "smoke", "full"],
"description": "Test scope to run after fix"
},
"specific_tests": {
"type": "array",
"items": {"type": "string"},
"description": "Specific test files or patterns to run"
},
"manual_verification": {
"type": "array",
"items": {"type": "string"},
"description": "Manual verification steps if automated tests not available"
}
},
"description": "Testing strategy for fix verification"
},
"rollback_plan": {
"type": "object",
"properties": {
"strategy": {
"type": "string",
"enum": ["git_revert", "feature_flag", "manual"],
"description": "Rollback strategy if fix fails"
},
"steps": {
"type": "array",
"items": {"type": "string"},
"description": "Rollback steps"
}
},
"description": "Rollback plan if fix causes issues (optional, recommended for high severity)"
},
"estimated_time": {
"type": "string",
"description": "Total estimated fix time (e.g., '30 minutes', '2 hours')"
},
"recommended_execution": {
"type": "string",
"enum": ["Agent", "Codex"],
"description": "Recommended execution method based on complexity"
},
"severity": {
"type": "string",
"enum": ["Low", "Medium", "High", "Critical"],
"description": "Bug severity level"
},
"risk_level": {
"type": "string",
"enum": ["low", "medium", "high"],
"description": "Risk level of implementing the fix"
},
"_metadata": {
"type": "object",
"required": ["timestamp", "source"],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of planning"
},
"source": {
"type": "string",
"enum": ["cli-lite-planning-agent", "direct-planning"],
"description": "Planning source"
},
"planning_mode": {
"type": "string",
"enum": ["direct", "agent-based"],
"description": "Planning execution mode"
},
"diagnosis_angles": {
"type": "array",
"items": {"type": "string"},
"description": "Diagnosis angles used for context"
},
"duration_seconds": {
"type": "integer",
"description": "Planning duration in seconds"
}
}
}
}
}

View File

@@ -0,0 +1,170 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Issues JSONL Schema",
"description": "Schema for each line in issues.jsonl (flat storage)",
"type": "object",
"required": ["id", "title", "status", "created_at"],
"properties": {
"id": {
"type": "string",
"description": "Issue ID (GH-123, ISS-xxx, DSC-001)"
},
"title": {
"type": "string"
},
"status": {
"type": "string",
"enum": ["registered", "planning", "planned", "queued", "executing", "completed", "failed", "paused"],
"default": "registered"
},
"priority": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"default": 3,
"description": "1=critical, 2=high, 3=medium, 4=low, 5=trivial"
},
"context": {
"type": "string",
"description": "Issue context/description (markdown)"
},
"source": {
"type": "string",
"enum": ["github", "text", "discovery"],
"description": "Source of the issue"
},
"source_url": {
"type": "string",
"description": "Original source URL (for GitHub issues)"
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Issue tags"
},
"extended_context": {
"type": "object",
"description": "Minimal extended context for planning hints",
"properties": {
"location": {
"type": "string",
"description": "file:line format (e.g., 'src/auth.ts:42')"
},
"suggested_fix": {
"type": "string",
"description": "Suggested remediation"
},
"notes": {
"type": "string",
"description": "Additional notes (user clarifications or discovery hints)"
}
}
},
"affected_components": {
"type": "array",
"items": { "type": "string" },
"description": "Files/modules affected"
},
"feedback": {
"type": "array",
"description": "Execution feedback history (failures, clarifications, rejections) for planning phase reference",
"items": {
"type": "object",
"required": ["type", "stage", "content", "created_at"],
"properties": {
"type": {
"type": "string",
"enum": ["failure", "clarification", "rejection"],
"description": "Type of feedback"
},
"stage": {
"type": "string",
"enum": ["new", "plan", "execute"],
"description": "Which stage the feedback occurred (new=creation, plan=planning, execute=execution)"
},
"content": {
"type": "string",
"description": "JSON string for failures (with solution_id, task_id, error_type, message, stack_trace) or plain text for clarifications/rejections"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when feedback was created"
}
}
}
},
"lifecycle_requirements": {
"type": "object",
"properties": {
"test_strategy": {
"type": "string",
"enum": ["unit", "integration", "e2e", "manual", "auto"]
},
"regression_scope": {
"type": "string",
"enum": ["affected", "related", "full"]
},
"acceptance_type": {
"type": "string",
"enum": ["automated", "manual", "both"]
},
"commit_strategy": {
"type": "string",
"enum": ["per-task", "squash", "atomic"]
}
}
},
"bound_solution_id": {
"type": "string",
"description": "ID of the bound solution (null if none bound)"
},
"solution_count": {
"type": "integer",
"default": 0,
"description": "Number of candidate solutions"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"planned_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
}
},
"examples": [
{
"id": "DSC-001",
"title": "Fix: SQLite connection pool memory leak",
"status": "registered",
"priority": 1,
"context": "Connection pool cleanup only happens when MAX_POOL_SIZE is reached...",
"source": "discovery",
"tags": ["bug", "resource-leak", "critical"],
"extended_context": {
"location": "storage/sqlite_store.py:59",
"suggested_fix": "Implement periodic cleanup or weak references",
"notes": null
},
"affected_components": ["storage/sqlite_store.py"],
"lifecycle_requirements": {
"test_strategy": "unit",
"regression_scope": "affected",
"acceptance_type": "automated",
"commit_strategy": "per-task"
},
"bound_solution_id": null,
"solution_count": 0,
"created_at": "2025-12-28T18:22:37Z"
}
]
}

View File

@@ -0,0 +1,421 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Multi-CLI Discussion Artifact Schema",
"description": "Visualization-friendly output for multi-CLI collaborative discussion agent",
"type": "object",
"required": ["metadata", "discussionTopic", "relatedFiles", "planning", "decision", "decisionRecords"],
"properties": {
"metadata": {
"type": "object",
"required": ["artifactId", "roundId", "timestamp", "contributingAgents"],
"properties": {
"artifactId": {
"type": "string",
"description": "Unique ID for this artifact (e.g., 'MCP-auth-refactor-2026-01-13-round-1')"
},
"roundId": {
"type": "integer",
"minimum": 1,
"description": "Discussion round number"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp"
},
"contributingAgents": {
"type": "array",
"items": {
"$ref": "#/definitions/AgentIdentifier"
},
"description": "Agents that contributed to this artifact"
},
"durationSeconds": {
"type": "integer",
"description": "Total duration in seconds"
},
"exportFormats": {
"type": "array",
"items": {
"type": "string",
"enum": ["markdown", "html"]
},
"description": "Supported export formats"
}
}
},
"discussionTopic": {
"type": "object",
"required": ["title", "description", "status"],
"properties": {
"title": {
"$ref": "#/definitions/I18nLabel"
},
"description": {
"$ref": "#/definitions/I18nLabel"
},
"scope": {
"type": "object",
"properties": {
"included": {
"type": "array",
"items": { "$ref": "#/definitions/I18nLabel" },
"description": "What's in scope"
},
"excluded": {
"type": "array",
"items": { "$ref": "#/definitions/I18nLabel" },
"description": "What's explicitly out of scope"
}
}
},
"keyQuestions": {
"type": "array",
"items": { "$ref": "#/definitions/I18nLabel" },
"description": "Questions being explored"
},
"status": {
"type": "string",
"enum": ["exploring", "analyzing", "debating", "decided", "blocked"],
"description": "Discussion status"
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Tags for filtering (e.g., ['auth', 'security', 'api'])"
}
}
},
"relatedFiles": {
"type": "object",
"properties": {
"fileTree": {
"type": "array",
"items": { "$ref": "#/definitions/FileNode" },
"description": "File tree structure"
},
"dependencyGraph": {
"type": "array",
"items": { "$ref": "#/definitions/DependencyEdge" },
"description": "Dependency relationships"
},
"impactSummary": {
"type": "array",
"items": { "$ref": "#/definitions/FileImpact" },
"description": "File impact summary"
}
}
},
"planning": {
"type": "object",
"properties": {
"functional": {
"type": "array",
"items": { "$ref": "#/definitions/Requirement" },
"description": "Functional requirements"
},
"nonFunctional": {
"type": "array",
"items": { "$ref": "#/definitions/Requirement" },
"description": "Non-functional requirements"
},
"acceptanceCriteria": {
"type": "array",
"items": { "$ref": "#/definitions/AcceptanceCriterion" },
"description": "Acceptance criteria"
}
}
},
"decision": {
"type": "object",
"required": ["status", "confidenceScore"],
"properties": {
"status": {
"type": "string",
"enum": ["pending", "decided", "conflict"],
"description": "Decision status"
},
"summary": {
"$ref": "#/definitions/I18nLabel"
},
"selectedSolution": {
"$ref": "#/definitions/Solution"
},
"rejectedAlternatives": {
"type": "array",
"items": { "$ref": "#/definitions/RejectedSolution" }
},
"confidenceScore": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score (0.0 to 1.0)"
}
}
},
"decisionRecords": {
"type": "object",
"properties": {
"timeline": {
"type": "array",
"items": { "$ref": "#/definitions/DecisionEvent" },
"description": "Timeline of decision events"
}
}
},
"_internal": {
"type": "object",
"description": "Internal analysis data (for debugging)",
"properties": {
"cli_analyses": {
"type": "array",
"items": { "$ref": "#/definitions/CLIAnalysis" }
},
"cross_verification": {
"$ref": "#/definitions/CrossVerification"
},
"convergence": {
"$ref": "#/definitions/ConvergenceMetrics"
}
}
}
},
"definitions": {
"I18nLabel": {
"type": "object",
"required": ["en", "zh"],
"properties": {
"en": { "type": "string" },
"zh": { "type": "string" }
},
"description": "Multi-language label for UI display"
},
"AgentIdentifier": {
"type": "object",
"required": ["name", "id"],
"properties": {
"name": {
"type": "string",
"enum": ["Gemini", "Codex", "Qwen", "Human", "System"]
},
"id": { "type": "string" }
}
},
"FileNode": {
"type": "object",
"required": ["path", "type"],
"properties": {
"path": { "type": "string" },
"type": {
"type": "string",
"enum": ["file", "directory"]
},
"modificationStatus": {
"type": "string",
"enum": ["added", "modified", "deleted", "unchanged"]
},
"impactScore": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"children": {
"type": "array",
"items": { "$ref": "#/definitions/FileNode" }
},
"codeSnippet": { "$ref": "#/definitions/CodeSnippet" }
}
},
"DependencyEdge": {
"type": "object",
"required": ["source", "target", "relationship"],
"properties": {
"source": { "type": "string" },
"target": { "type": "string" },
"relationship": { "type": "string" }
}
},
"FileImpact": {
"type": "object",
"required": ["filePath", "score", "reasoning"],
"properties": {
"filePath": { "type": "string" },
"line": { "type": "integer" },
"score": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"reasoning": { "$ref": "#/definitions/I18nLabel" }
}
},
"CodeSnippet": {
"type": "object",
"required": ["startLine", "endLine", "code"],
"properties": {
"startLine": { "type": "integer" },
"endLine": { "type": "integer" },
"code": { "type": "string" },
"language": { "type": "string" },
"comment": { "$ref": "#/definitions/I18nLabel" }
}
},
"Requirement": {
"type": "object",
"required": ["id", "description", "priority"],
"properties": {
"id": { "type": "string" },
"description": { "$ref": "#/definitions/I18nLabel" },
"priority": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"source": { "type": "string" }
}
},
"AcceptanceCriterion": {
"type": "object",
"required": ["id", "description", "isMet"],
"properties": {
"id": { "type": "string" },
"description": { "$ref": "#/definitions/I18nLabel" },
"isMet": { "type": "boolean" }
}
},
"Solution": {
"type": "object",
"required": ["id", "title", "description"],
"properties": {
"id": { "type": "string" },
"title": { "$ref": "#/definitions/I18nLabel" },
"description": { "$ref": "#/definitions/I18nLabel" },
"pros": {
"type": "array",
"items": { "$ref": "#/definitions/I18nLabel" }
},
"cons": {
"type": "array",
"items": { "$ref": "#/definitions/I18nLabel" }
},
"estimatedEffort": { "$ref": "#/definitions/I18nLabel" },
"risk": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"affectedFiles": {
"type": "array",
"items": { "$ref": "#/definitions/FileImpact" }
},
"sourceCLIs": {
"type": "array",
"items": { "type": "string" }
}
}
},
"RejectedSolution": {
"allOf": [
{ "$ref": "#/definitions/Solution" },
{
"type": "object",
"required": ["rejectionReason"],
"properties": {
"rejectionReason": { "$ref": "#/definitions/I18nLabel" }
}
}
]
},
"DecisionEvent": {
"type": "object",
"required": ["eventId", "timestamp", "type", "contributor", "summary"],
"properties": {
"eventId": { "type": "string" },
"timestamp": {
"type": "string",
"format": "date-time"
},
"type": {
"type": "string",
"enum": ["proposal", "argument", "agreement", "disagreement", "decision", "reversal"]
},
"contributor": { "$ref": "#/definitions/AgentIdentifier" },
"summary": { "$ref": "#/definitions/I18nLabel" },
"evidence": {
"type": "array",
"items": { "$ref": "#/definitions/Evidence" }
},
"reversibility": {
"type": "string",
"enum": ["easily_reversible", "requires_refactoring", "irreversible"]
}
}
},
"Evidence": {
"type": "object",
"required": ["type", "content", "description"],
"properties": {
"type": {
"type": "string",
"enum": ["link", "code_snippet", "log_output", "benchmark", "reference"]
},
"content": {},
"description": { "$ref": "#/definitions/I18nLabel" }
}
},
"CLIAnalysis": {
"type": "object",
"required": ["tool", "perspective", "feasibility_score"],
"properties": {
"tool": {
"type": "string",
"enum": ["gemini", "codex", "qwen"]
},
"perspective": { "type": "string" },
"feasibility_score": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"findings": {
"type": "array",
"items": { "type": "string" }
},
"implementation_approaches": { "type": "array" },
"technical_concerns": {
"type": "array",
"items": { "type": "string" }
},
"code_locations": {
"type": "array",
"items": { "$ref": "#/definitions/FileImpact" }
}
}
},
"CrossVerification": {
"type": "object",
"properties": {
"agreements": {
"type": "array",
"items": { "type": "string" }
},
"disagreements": {
"type": "array",
"items": { "type": "string" }
},
"resolution": { "type": "string" }
}
},
"ConvergenceMetrics": {
"type": "object",
"properties": {
"score": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"new_insights": { "type": "boolean" },
"recommendation": {
"type": "string",
"enum": ["continue", "converged", "user_input_needed"]
}
}
}
}
}

View File

@@ -0,0 +1,444 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Plan Object Schema",
"description": "Implementation plan from cli-lite-planning-agent or direct planning",
"type": "object",
"required": [
"summary",
"approach",
"tasks",
"estimated_time",
"recommended_execution",
"complexity",
"_metadata"
],
"properties": {
"summary": {
"type": "string",
"description": "2-3 sentence overview of the implementation plan"
},
"approach": {
"type": "string",
"description": "High-level implementation strategy and methodology"
},
"tasks": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "object",
"required": ["id", "title", "scope", "action", "description", "implementation", "acceptance"],
"properties": {
"id": {
"type": "string",
"pattern": "^T[0-9]+$",
"description": "Task identifier (T1, T2, T3...)"
},
"title": {
"type": "string",
"description": "Task title (action verb + target module/feature)"
},
"scope": {
"type": "string",
"description": "Task scope: module path (src/auth/), feature name, or single file. Prefer module/feature level over single file."
},
"file": {
"type": "string",
"description": "Primary file (deprecated, use scope + modification_points instead)"
},
"action": {
"type": "string",
"enum": ["Create", "Update", "Implement", "Refactor", "Add", "Delete", "Configure", "Test", "Fix"],
"description": "Primary action type"
},
"description": {
"type": "string",
"description": "What to implement (1-2 sentences)"
},
"modification_points": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["file", "target", "change"],
"properties": {
"file": {
"type": "string",
"description": "File path within scope"
},
"target": {
"type": "string",
"description": "Function/class/line range (e.g., 'validateToken:45-60')"
},
"change": {
"type": "string",
"description": "Brief description of change"
}
}
},
"description": "All modification points for this task. Group related changes (same feature/module) into one task with multiple modification_points."
},
"implementation": {
"type": "array",
"items": {"type": "string"},
"minItems": 2,
"maxItems": 7,
"description": "Step-by-step implementation guide"
},
"reference": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Pattern name to follow"
},
"files": {
"type": "array",
"items": {"type": "string"},
"description": "Reference file paths to study"
},
"examples": {
"type": "string",
"description": "Specific guidance or example references"
}
},
"description": "Reference materials for implementation (optional)"
},
"acceptance": {
"type": "array",
"items": {"type": "string"},
"minItems": 1,
"maxItems": 4,
"description": "Verification criteria (quantified, testable)"
},
"depends_on": {
"type": "array",
"items": {
"type": "string",
"pattern": "^T[0-9]+$"
},
"description": "Task IDs this task depends on (e.g., ['T1', 'T2'])"
},
"cli_execution_id": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$",
"description": "Fixed CLI execution ID for this task (e.g., 'session-T1', 'IMPL-001-analysis')"
},
"cli_execution": {
"type": "object",
"properties": {
"strategy": {
"type": "string",
"enum": ["new", "resume", "fork", "merge_fork"],
"description": "CLI execution strategy: new (no deps), resume (1 dep, continue), fork (1 dep, branch), merge_fork (N deps, combine)"
},
"resume_from": {
"type": "string",
"description": "Parent task's cli_execution_id (for resume/fork strategies)"
},
"merge_from": {
"type": "array",
"items": {"type": "string"},
"description": "Multiple parents' cli_execution_ids (for merge_fork strategy)"
}
},
"description": "CLI execution strategy based on task dependencies"
},
"rationale": {
"type": "object",
"properties": {
"chosen_approach": {
"type": "string",
"description": "The selected implementation approach and why it was chosen"
},
"alternatives_considered": {
"type": "array",
"items": {"type": "string"},
"description": "Alternative approaches that were considered but not chosen"
},
"decision_factors": {
"type": "array",
"items": {"type": "string"},
"description": "Key factors that influenced the decision (performance, maintainability, cost, etc.)"
},
"tradeoffs": {
"type": "string",
"description": "Known tradeoffs of the chosen approach"
}
},
"description": "Design rationale explaining WHY this approach was chosen (required for Medium/High complexity)"
},
"verification": {
"type": "object",
"properties": {
"unit_tests": {
"type": "array",
"items": {"type": "string"},
"description": "List of unit test names/descriptions to create"
},
"integration_tests": {
"type": "array",
"items": {"type": "string"},
"description": "List of integration test names/descriptions to create"
},
"manual_checks": {
"type": "array",
"items": {"type": "string"},
"description": "Manual verification steps with specific actions"
},
"success_metrics": {
"type": "array",
"items": {"type": "string"},
"description": "Quantified metrics for success (e.g., 'Response time <200ms', 'Coverage >80%')"
}
},
"description": "Detailed verification steps beyond acceptance criteria (required for Medium/High complexity)"
},
"risks": {
"type": "array",
"items": {
"type": "object",
"required": ["description", "probability", "impact", "mitigation"],
"properties": {
"description": {
"type": "string",
"description": "Description of the risk"
},
"probability": {
"type": "string",
"enum": ["Low", "Medium", "High"],
"description": "Likelihood of the risk occurring"
},
"impact": {
"type": "string",
"enum": ["Low", "Medium", "High"],
"description": "Impact severity if the risk occurs"
},
"mitigation": {
"type": "string",
"description": "Strategy to mitigate or prevent the risk"
},
"fallback": {
"type": "string",
"description": "Alternative approach if mitigation fails"
}
}
},
"description": "Risk assessment and mitigation strategies (required for High complexity)"
},
"code_skeleton": {
"type": "object",
"properties": {
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"definition": {"type": "string"},
"purpose": {"type": "string"}
}
},
"description": "Key interface/type definitions"
},
"key_functions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signature": {"type": "string"},
"purpose": {"type": "string"},
"returns": {"type": "string"}
}
},
"description": "Critical function signatures"
},
"classes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"purpose": {"type": "string"},
"methods": {
"type": "array",
"items": {"type": "string"}
}
}
},
"description": "Key class structures"
}
},
"description": "Code skeleton with interface/function signatures (required for High complexity)"
}
}
},
"description": "Structured task breakdown (1-10 tasks)"
},
"data_flow": {
"type": "object",
"properties": {
"diagram": {
"type": "string",
"description": "ASCII/text representation of data flow (e.g., 'A → B → C')"
},
"stages": {
"type": "array",
"items": {
"type": "object",
"required": ["stage", "input", "output", "component"],
"properties": {
"stage": {
"type": "string",
"description": "Stage name (e.g., 'Extraction', 'Processing', 'Storage')"
},
"input": {
"type": "string",
"description": "Input data format/type"
},
"output": {
"type": "string",
"description": "Output data format/type"
},
"component": {
"type": "string",
"description": "Component/module handling this stage"
},
"transformations": {
"type": "array",
"items": {"type": "string"},
"description": "Data transformations applied in this stage"
}
}
},
"description": "Detailed data flow stages"
},
"dependencies": {
"type": "array",
"items": {"type": "string"},
"description": "External dependencies or data sources"
}
},
"description": "Global data flow design showing how data moves through the system (required for High complexity)"
},
"design_decisions": {
"type": "array",
"items": {
"type": "object",
"required": ["decision", "rationale"],
"properties": {
"decision": {
"type": "string",
"description": "The design decision made"
},
"rationale": {
"type": "string",
"description": "Why this decision was made"
},
"tradeoff": {
"type": "string",
"description": "What was traded off for this decision"
},
"alternatives": {
"type": "array",
"items": {"type": "string"},
"description": "Alternatives that were considered"
}
}
},
"description": "Global design decisions that affect the entire plan"
},
"flow_control": {
"type": "object",
"properties": {
"execution_order": {
"type": "array",
"items": {
"type": "object",
"properties": {
"phase": {
"type": "string",
"description": "Phase name (e.g., 'parallel-1', 'sequential-1')"
},
"tasks": {
"type": "array",
"items": {"type": "string"},
"description": "Task IDs in this phase"
},
"type": {
"type": "string",
"enum": ["parallel", "sequential"],
"description": "Execution type"
}
}
},
"description": "Ordered execution phases"
},
"exit_conditions": {
"type": "object",
"properties": {
"success": {
"type": "string",
"description": "Condition for successful completion"
},
"failure": {
"type": "string",
"description": "Condition that indicates failure"
}
},
"description": "Conditions for workflow termination"
}
},
"description": "Execution flow control (optional, auto-inferred from depends_on if not provided)"
},
"focus_paths": {
"type": "array",
"items": {"type": "string"},
"description": "Key file paths affected by this plan (aggregated from tasks)"
},
"estimated_time": {
"type": "string",
"description": "Total estimated implementation time (e.g., '30 minutes', '2 hours')"
},
"recommended_execution": {
"type": "string",
"enum": ["Agent", "Codex"],
"description": "Recommended execution method based on complexity"
},
"complexity": {
"type": "string",
"enum": ["Low", "Medium", "High"],
"description": "Task complexity level"
},
"_metadata": {
"type": "object",
"required": ["timestamp", "source"],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of planning"
},
"source": {
"type": "string",
"enum": ["cli-lite-planning-agent", "direct-planning"],
"description": "Planning source"
},
"planning_mode": {
"type": "string",
"enum": ["direct", "agent-based"],
"description": "Planning execution mode"
},
"exploration_angles": {
"type": "array",
"items": {"type": "string"},
"description": "Exploration angles used for context"
},
"duration_seconds": {
"type": "integer",
"description": "Planning duration in seconds"
}
}
}
}
}

View File

@@ -0,0 +1,51 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Plan Verification Agent Schema",
"description": "Defines dimensions, severity rules, and CLI templates for plan verification agent",
"dimensions": {
"A": { "name": "User Intent Alignment", "tier": 1, "severity": "CRITICAL",
"checks": ["Goal Alignment", "Scope Drift", "Success Criteria Match", "Intent Conflicts"] },
"B": { "name": "Requirements Coverage", "tier": 1, "severity": "CRITICAL",
"checks": ["Orphaned Requirements", "Unmapped Tasks", "NFR Coverage Gaps"] },
"C": { "name": "Consistency Validation", "tier": 1, "severity": "CRITICAL",
"checks": ["Requirement Conflicts", "Architecture Drift", "Terminology Drift", "Data Model Inconsistency"] },
"D": { "name": "Dependency Integrity", "tier": 2, "severity": "HIGH",
"checks": ["Circular Dependencies", "Missing Dependencies", "Broken Dependencies", "Logical Ordering"] },
"E": { "name": "Synthesis Alignment", "tier": 2, "severity": "HIGH",
"checks": ["Priority Conflicts", "Success Criteria Mismatch", "Risk Mitigation Gaps"] },
"F": { "name": "Task Specification Quality", "tier": 3, "severity": "MEDIUM",
"checks": ["Ambiguous Focus Paths", "Underspecified Acceptance", "Missing Artifacts", "Weak Flow Control"] },
"G": { "name": "Duplication Detection", "tier": 4, "severity": "LOW",
"checks": ["Overlapping Task Scope", "Redundant Coverage"] },
"H": { "name": "Feasibility Assessment", "tier": 4, "severity": "LOW",
"checks": ["Complexity Misalignment", "Resource Conflicts", "Skill Gap Risks"] },
"I": { "name": "Constraints Compliance", "tier": 1, "severity": "CRITICAL",
"checks": ["Consolidated Constraints Violation", "Phase Constraint Ignored", "User Constraint Override"] },
"J": { "name": "N+1 Context Validation", "tier": 2, "severity": "HIGH",
"checks": ["Deferred Item Included", "Decision Contradiction", "Revisit Flag Ignored"] }
},
"tiers": {
"1": { "dimensions": ["A", "B", "C", "I"], "priority": "CRITICAL", "limit": null, "rule": "analysis-review-architecture" },
"2": { "dimensions": ["D", "E", "J"], "priority": "HIGH", "limit": 15, "rule": "analysis-diagnose-bug-root-cause" },
"3": { "dimensions": ["F"], "priority": "MEDIUM", "limit": 20, "rule": "analysis-analyze-code-patterns" },
"4": { "dimensions": ["G", "H"], "priority": "LOW", "limit": 15, "rule": "analysis-analyze-code-patterns" }
},
"severity_rules": {
"CRITICAL": ["User intent violation", "Synthesis authority violation", "Zero coverage", "Circular/broken deps", "Constraint violation"],
"HIGH": ["NFR gaps", "Priority conflicts", "Missing risk mitigation", "Deferred item included", "Decision contradiction"],
"MEDIUM": ["Terminology drift", "Missing refs", "Weak flow control"],
"LOW": ["Style improvements", "Minor redundancy"]
},
"quality_gate": {
"BLOCK_EXECUTION": { "condition": "critical > 0", "emoji": "🛑" },
"PROCEED_WITH_FIXES": { "condition": "critical == 0 && high > 0", "emoji": "⚠️" },
"PROCEED_WITH_CAUTION": { "condition": "critical == 0 && high == 0 && medium > 0", "emoji": "✅" },
"PROCEED": { "condition": "only low or none", "emoji": "✅" }
},
"token_budget": { "total_findings": 50, "early_exit": "CRITICAL > 0 in Tier 1 → skip Tier 3-4" }
}

View File

@@ -0,0 +1,141 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Project Guidelines Schema",
"description": "Schema for project-guidelines.json - user-maintained rules and constraints",
"type": "object",
"required": ["conventions", "constraints", "_metadata"],
"properties": {
"conventions": {
"type": "object",
"description": "Coding conventions and standards",
"required": ["coding_style", "naming_patterns", "file_structure", "documentation"],
"properties": {
"coding_style": {
"type": "array",
"items": { "type": "string" },
"description": "Coding style rules (e.g., 'Use strict TypeScript mode', 'Prefer const over let')"
},
"naming_patterns": {
"type": "array",
"items": { "type": "string" },
"description": "Naming conventions (e.g., 'Use camelCase for variables', 'Use PascalCase for components')"
},
"file_structure": {
"type": "array",
"items": { "type": "string" },
"description": "File organization rules (e.g., 'One component per file', 'Tests alongside source files')"
},
"documentation": {
"type": "array",
"items": { "type": "string" },
"description": "Documentation requirements (e.g., 'JSDoc for public APIs', 'README for each module')"
}
}
},
"constraints": {
"type": "object",
"description": "Technical constraints and boundaries",
"required": ["architecture", "tech_stack", "performance", "security"],
"properties": {
"architecture": {
"type": "array",
"items": { "type": "string" },
"description": "Architecture constraints (e.g., 'No circular dependencies', 'Services must be stateless')"
},
"tech_stack": {
"type": "array",
"items": { "type": "string" },
"description": "Technology constraints (e.g., 'No new dependencies without review', 'Use native fetch over axios')"
},
"performance": {
"type": "array",
"items": { "type": "string" },
"description": "Performance requirements (e.g., 'API response < 200ms', 'Bundle size < 500KB')"
},
"security": {
"type": "array",
"items": { "type": "string" },
"description": "Security requirements (e.g., 'Sanitize all user input', 'No secrets in code')"
}
}
},
"quality_rules": {
"type": "array",
"description": "Enforceable quality rules",
"items": {
"type": "object",
"required": ["rule", "scope"],
"properties": {
"rule": {
"type": "string",
"description": "The quality rule statement"
},
"scope": {
"type": "string",
"description": "Where the rule applies (e.g., 'all', 'src/**', 'tests/**')"
},
"enforced_by": {
"type": "string",
"description": "How the rule is enforced (e.g., 'eslint', 'pre-commit', 'code-review')"
}
}
}
},
"learnings": {
"type": "array",
"description": "Project learnings captured from workflow sessions",
"items": {
"type": "object",
"required": ["date", "insight"],
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Date the learning was captured (YYYY-MM-DD)"
},
"session_id": {
"type": "string",
"description": "WFS session ID where the learning originated"
},
"insight": {
"type": "string",
"description": "The learning or insight captured"
},
"context": {
"type": "string",
"description": "Additional context about when/why this learning applies"
},
"category": {
"type": "string",
"enum": ["architecture", "performance", "security", "testing", "workflow", "other"],
"description": "Category of the learning"
}
}
}
},
"_metadata": {
"type": "object",
"required": ["created_at", "version"],
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of creation"
},
"version": {
"type": "string",
"description": "Schema version (e.g., '1.0.0')"
},
"last_updated": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of last update"
},
"updated_by": {
"type": "string",
"description": "Who/what last updated the file (e.g., 'user', 'workflow:session:solidify')"
}
}
}
}
}

View File

@@ -0,0 +1,221 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Project Tech Schema",
"description": "Schema for project-tech.json - auto-generated technical analysis (stack, architecture, components)",
"type": "object",
"required": [
"project_name",
"initialized_at",
"overview",
"features",
"statistics",
"_metadata"
],
"properties": {
"project_name": {
"type": "string",
"description": "Project name extracted from git repo or directory"
},
"initialized_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of initialization"
},
"overview": {
"type": "object",
"required": [
"description",
"technology_stack",
"architecture",
"key_components"
],
"properties": {
"description": {
"type": "string",
"description": "Brief project description (e.g., 'TypeScript web application with React frontend')"
},
"technology_stack": {
"type": "object",
"required": ["languages", "frameworks", "build_tools", "test_frameworks"],
"properties": {
"languages": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "file_count", "primary"],
"properties": {
"name": {
"type": "string",
"description": "Language name (e.g., TypeScript, Python)"
},
"file_count": {
"type": "integer",
"description": "Number of source files in this language"
},
"primary": {
"type": "boolean",
"description": "True if this is the primary language"
}
}
}
},
"frameworks": {
"type": "array",
"items": {"type": "string"},
"description": "Detected frameworks (React, Express, Django, etc.)"
},
"build_tools": {
"type": "array",
"items": {"type": "string"},
"description": "Build tools and package managers (npm, cargo, maven, etc.)"
},
"test_frameworks": {
"type": "array",
"items": {"type": "string"},
"description": "Testing frameworks (jest, pytest, go test, etc.)"
}
}
},
"architecture": {
"type": "object",
"required": ["style", "layers", "patterns"],
"properties": {
"style": {
"type": "string",
"description": "Architecture style (MVC, microservices, layered, etc.)"
},
"layers": {
"type": "array",
"items": {"type": "string"},
"description": "Architectural layers (presentation, business-logic, data-access)"
},
"patterns": {
"type": "array",
"items": {"type": "string"},
"description": "Design patterns (Repository, Factory, Singleton, etc.)"
}
}
},
"key_components": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "path", "description", "importance"],
"properties": {
"name": {
"type": "string",
"description": "Component name"
},
"path": {
"type": "string",
"description": "Relative path to component directory"
},
"description": {
"type": "string",
"description": "Brief description of component functionality"
},
"importance": {
"type": "string",
"enum": ["high", "medium", "low"],
"description": "Component importance level"
}
}
},
"description": "5-10 core modules/components"
}
}
},
"features": {
"type": "array",
"items": {
"type": "object",
"required": ["session_id", "title", "completed_at", "tags"],
"properties": {
"session_id": {
"type": "string",
"description": "WFS session identifier"
},
"title": {
"type": "string",
"description": "Feature title/description"
},
"completed_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of completion"
},
"tags": {
"type": "array",
"items": {"type": "string"},
"description": "Feature tags for categorization"
}
}
},
"description": "Completed workflow features (populated by /workflow:session:complete)"
},
"development_index": {
"type": "object",
"description": "Categorized development history (lite-plan/lite-execute)",
"properties": {
"feature": { "type": "array", "items": { "$ref": "#/$defs/devIndexEntry" } },
"enhancement": { "type": "array", "items": { "$ref": "#/$defs/devIndexEntry" } },
"bugfix": { "type": "array", "items": { "$ref": "#/$defs/devIndexEntry" } },
"refactor": { "type": "array", "items": { "$ref": "#/$defs/devIndexEntry" } },
"docs": { "type": "array", "items": { "$ref": "#/$defs/devIndexEntry" } }
}
},
"statistics": {
"type": "object",
"required": ["total_features", "total_sessions", "last_updated"],
"properties": {
"total_features": {
"type": "integer",
"description": "Count of completed features"
},
"total_sessions": {
"type": "integer",
"description": "Count of workflow sessions"
},
"last_updated": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of last update"
}
}
},
"_metadata": {
"type": "object",
"required": ["initialized_by", "analysis_timestamp", "analysis_mode"],
"properties": {
"initialized_by": {
"type": "string",
"description": "Agent or tool that performed initialization"
},
"analysis_timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of analysis"
},
"analysis_mode": {
"type": "string",
"enum": ["deep-scan", "quick-scan", "bash-fallback"],
"description": "Analysis mode used"
}
}
}
},
"$defs": {
"devIndexEntry": {
"type": "object",
"required": ["title", "sub_feature", "date", "description", "status"],
"properties": {
"title": { "type": "string", "maxLength": 60 },
"sub_feature": { "type": "string", "description": "Module/component area" },
"date": { "type": "string", "format": "date" },
"description": { "type": "string", "maxLength": 100 },
"status": { "type": "string", "enum": ["completed", "partial"] },
"session_id": { "type": "string", "description": "lite-plan session ID" }
}
}
}
}

View File

@@ -0,0 +1,248 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Issue Execution Queue Schema",
"description": "Execution queue supporting both task-level (T-N) and solution-level (S-N) granularity",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^QUE-[0-9]{8}-[0-9]{6}$",
"description": "Queue ID in format QUE-YYYYMMDD-HHMMSS"
},
"status": {
"type": "string",
"enum": ["active", "paused", "completed", "archived"],
"default": "active"
},
"issue_ids": {
"type": "array",
"items": { "type": "string" },
"description": "Issues included in this queue"
},
"solutions": {
"type": "array",
"description": "Solution-level queue items (preferred for new queues)",
"items": {
"$ref": "#/definitions/solutionItem"
}
},
"tasks": {
"type": "array",
"description": "Task-level queue items (legacy format)",
"items": {
"$ref": "#/definitions/taskItem"
}
},
"conflicts": {
"type": "array",
"description": "Detected conflicts between items",
"items": {
"$ref": "#/definitions/conflict"
}
},
"execution_groups": {
"type": "array",
"description": "Parallel/Sequential execution groups",
"items": {
"$ref": "#/definitions/executionGroup"
}
},
"_metadata": {
"type": "object",
"properties": {
"version": { "type": "string", "default": "2.0" },
"queue_type": {
"type": "string",
"enum": ["solution", "task"],
"description": "Queue granularity level"
},
"total_solutions": { "type": "integer" },
"total_tasks": { "type": "integer" },
"pending_count": { "type": "integer" },
"ready_count": { "type": "integer" },
"executing_count": { "type": "integer" },
"completed_count": { "type": "integer" },
"failed_count": { "type": "integer" },
"last_queue_formation": { "type": "string", "format": "date-time" },
"last_updated": { "type": "string", "format": "date-time" }
}
}
},
"definitions": {
"solutionItem": {
"type": "object",
"required": ["item_id", "issue_id", "solution_id", "status", "task_count", "files_touched"],
"properties": {
"item_id": {
"type": "string",
"pattern": "^S-[0-9]+$",
"description": "Solution-level queue item ID (S-1, S-2, ...)"
},
"issue_id": {
"type": "string",
"description": "Source issue ID"
},
"solution_id": {
"type": "string",
"description": "Bound solution ID"
},
"status": {
"type": "string",
"enum": ["pending", "ready", "executing", "completed", "failed", "blocked"],
"default": "pending"
},
"task_count": {
"type": "integer",
"minimum": 1,
"description": "Number of tasks in this solution"
},
"files_touched": {
"type": "array",
"items": { "type": "string" },
"description": "All files modified by this solution"
},
"execution_order": {
"type": "integer",
"description": "Order in execution sequence"
},
"execution_group": {
"type": "string",
"description": "Parallel (P*) or Sequential (S*) group ID"
},
"depends_on": {
"type": "array",
"items": { "type": "string" },
"description": "Solution IDs this item depends on"
},
"semantic_priority": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Semantic importance score (0.0-1.0)"
},
"queued_at": { "type": "string", "format": "date-time" },
"started_at": { "type": "string", "format": "date-time" },
"completed_at": { "type": "string", "format": "date-time" },
"result": {
"type": "object",
"properties": {
"summary": { "type": "string" },
"files_modified": { "type": "array", "items": { "type": "string" } },
"tasks_completed": { "type": "integer" },
"commit_hashes": { "type": "array", "items": { "type": "string" } }
}
},
"failure_reason": { "type": "string" }
}
},
"taskItem": {
"type": "object",
"required": ["item_id", "issue_id", "solution_id", "task_id", "status"],
"properties": {
"item_id": {
"type": "string",
"pattern": "^T-[0-9]+$",
"description": "Task-level queue item ID (T-1, T-2, ...)"
},
"issue_id": { "type": "string" },
"solution_id": { "type": "string" },
"task_id": { "type": "string" },
"status": {
"type": "string",
"enum": ["pending", "ready", "executing", "completed", "failed", "blocked"],
"default": "pending"
},
"execution_order": { "type": "integer" },
"execution_group": { "type": "string" },
"depends_on": { "type": "array", "items": { "type": "string" } },
"semantic_priority": { "type": "number", "minimum": 0, "maximum": 1 },
"queued_at": { "type": "string", "format": "date-time" },
"started_at": { "type": "string", "format": "date-time" },
"completed_at": { "type": "string", "format": "date-time" },
"result": {
"type": "object",
"properties": {
"files_modified": { "type": "array", "items": { "type": "string" } },
"files_created": { "type": "array", "items": { "type": "string" } },
"summary": { "type": "string" },
"commit_hash": { "type": "string" }
}
},
"failure_reason": { "type": "string" }
}
},
"conflict": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["file_conflict", "dependency_conflict", "resource_conflict"]
},
"file": {
"type": "string",
"description": "Conflicting file path"
},
"solutions": {
"type": "array",
"items": { "type": "string" },
"description": "Solution IDs involved (for solution-level queues)"
},
"tasks": {
"type": "array",
"items": { "type": "string" },
"description": "Task IDs involved (for task-level queues)"
},
"resolution": {
"type": "string",
"enum": ["sequential", "merge", "manual"]
},
"resolution_order": {
"type": "array",
"items": { "type": "string" },
"description": "Execution order to resolve conflict"
},
"rationale": {
"type": "string",
"description": "Explanation of resolution decision"
},
"resolved": {
"type": "boolean",
"default": false
}
}
},
"executionGroup": {
"type": "object",
"required": ["id", "type"],
"properties": {
"id": {
"type": "string",
"pattern": "^[PS][0-9]+$",
"description": "Group ID (P1, P2 for parallel, S1, S2 for sequential)"
},
"type": {
"type": "string",
"enum": ["parallel", "sequential"]
},
"solutions": {
"type": "array",
"items": { "type": "string" },
"description": "Solution IDs in this group"
},
"tasks": {
"type": "array",
"items": { "type": "string" },
"description": "Task IDs in this group (legacy)"
},
"solution_count": {
"type": "integer",
"description": "Number of solutions in group"
},
"task_count": {
"type": "integer",
"description": "Number of tasks in group (legacy)"
}
}
}
}
}

View File

@@ -0,0 +1,94 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Issue Registry Schema",
"description": "Global registry of all issues and their solutions",
"type": "object",
"properties": {
"issues": {
"type": "array",
"description": "List of registered issues",
"items": {
"type": "object",
"required": ["id", "title", "status", "created_at"],
"properties": {
"id": {
"type": "string",
"description": "Issue ID (e.g., GH-123, TEXT-xxx)"
},
"title": {
"type": "string"
},
"status": {
"type": "string",
"enum": ["registered", "planning", "planned", "queued", "executing", "completed", "failed", "paused"],
"default": "registered"
},
"priority": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"default": 3
},
"solution_count": {
"type": "integer",
"default": 0,
"description": "Number of candidate solutions"
},
"bound_solution_id": {
"type": "string",
"description": "ID of the bound solution (null if none bound)"
},
"source": {
"type": "string",
"enum": ["github", "text", "file"],
"description": "Source of the issue"
},
"source_url": {
"type": "string",
"description": "Original source URL (for GitHub issues)"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"planned_at": {
"type": "string",
"format": "date-time"
},
"queued_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
}
}
}
},
"_metadata": {
"type": "object",
"properties": {
"version": { "type": "string", "default": "1.0" },
"total_issues": { "type": "integer" },
"by_status": {
"type": "object",
"properties": {
"registered": { "type": "integer" },
"planning": { "type": "integer" },
"planned": { "type": "integer" },
"queued": { "type": "integer" },
"executing": { "type": "integer" },
"completed": { "type": "integer" },
"failed": { "type": "integer" }
}
},
"last_updated": { "type": "string", "format": "date-time" }
}
}
}
}

View File

@@ -0,0 +1,82 @@
[
{
"finding_id": "sec-001-a1b2c3d4",
"original_dimension": "security",
"iteration": 1,
"analysis_timestamp": "2025-01-25T14:40:15Z",
"cli_tool_used": "gemini",
"root_cause": {
"summary": "Legacy code from v1 migration, pre-ORM implementation",
"details": "Query builder was ported from old codebase without security review. Team unaware of injection risks in string concatenation pattern. Code review at migration time focused on functionality, not security.",
"affected_scope": "All query-builder.ts methods using string template literals (15 methods total)",
"similar_patterns": [
"src/database/user-queries.ts:buildEmailQuery",
"src/database/order-queries.ts:buildOrderSearch"
]
},
"remediation_plan": {
"approach": "Migrate to ORM prepared statements with input validation layer",
"priority": "P0 - Critical (security vulnerability)",
"estimated_effort": "4 hours development + 2 hours testing",
"risk_level": "low",
"steps": [
{
"step": 1,
"action": "Replace direct string concatenation with ORM query builder",
"files": ["src/database/query-builder.ts:buildUserQuery:140-150"],
"commands": [
"Replace: const query = `SELECT * FROM users WHERE id = ${userId}`;",
"With: return db('users').where('id', userId).first();"
],
"rationale": "ORM automatically parameterizes queries, eliminating injection risk",
"validation": "Run: npm test -- src/database/query-builder.test.ts"
},
{
"step": 2,
"action": "Add input validation layer before ORM",
"files": ["src/database/validators.ts:validateUserId:NEW"],
"commands": [
"Create validator: export function validateUserId(id: unknown): number { ... }",
"Add schema: z.number().positive().int()"
],
"rationale": "Defense in depth - validate types and ranges before database layer",
"validation": "Run: npm test -- src/database/validators.test.ts"
},
{
"step": 3,
"action": "Apply pattern to all 15 similar methods",
"files": ["src/database/query-builder.ts:ALL_METHODS"],
"commands": ["Bulk replace string templates with ORM syntax"],
"rationale": "Prevent similar vulnerabilities in other query methods",
"validation": "Run: npm test -- src/database/"
}
],
"rollback_strategy": "Git commit before each step, revert if tests fail. Staged rollout: dev → staging → production with monitoring."
},
"impact_assessment": {
"files_affected": [
"src/database/query-builder.ts (modify)",
"src/database/validators.ts (new)",
"src/database/user-queries.ts (modify)",
"src/database/order-queries.ts (modify)"
],
"tests_required": [
"src/database/query-builder.test.ts (update existing)",
"src/database/validators.test.ts (new)",
"integration/security/sql-injection.test.ts (new)"
],
"breaking_changes": false,
"dependencies_updated": ["knex@2.5.1 (ORM library)"],
"deployment_notes": "No downtime required. Database migrations not needed."
},
"reassessed_severity": "high",
"severity_change_reason": "Found existing WAF rules partially mitigate risk in production. Input validation at API gateway layer provides additional defense. Downgrade from critical to high, but still requires immediate fix.",
"confidence_score": 0.95,
"references": [
"Project ORM migration guide: docs/architecture/orm-guide.md",
"Knex.js parameterization: https://knexjs.org/guide/query-builder.html#where",
"Similar incident: TICKET-1234 (previous SQL injection fix)"
],
"status": "remediation_plan_ready"
}
]

View File

@@ -0,0 +1,51 @@
[
{
"dimension": "security",
"review_id": "review-20250125-143022",
"analysis_timestamp": "2025-01-25T14:30:22Z",
"cli_tool_used": "gemini",
"model": "gemini-2.5-pro",
"analysis_duration_ms": 2145000,
"summary": {
"total_findings": 15,
"critical": 2,
"high": 4,
"medium": 6,
"low": 3,
"files_analyzed": 47,
"lines_reviewed": 8932
},
"findings": [
{
"id": "sec-001-a1b2c3d4",
"title": "SQL Injection vulnerability in user query",
"severity": "critical",
"category": "injection",
"description": "Direct string concatenation in SQL query allows injection attacks. User input is not sanitized before query execution.",
"file": "src/database/query-builder.ts",
"line": 145,
"snippet": "const query = `SELECT * FROM users WHERE id = ${userId}`;",
"recommendation": "Use parameterized queries: db.query('SELECT * FROM users WHERE id = ?', [userId])",
"references": [
"OWASP Top 10 - A03:2021 Injection",
"https://owasp.org/www-community/attacks/SQL_Injection"
],
"impact": "Potential data breach, unauthorized access to user records, data manipulation",
"metadata": {
"cwe_id": "CWE-89",
"owasp_category": "A03:2021-Injection"
},
"iteration": 0,
"status": "pending_remediation",
"cross_references": []
}
],
"cross_references": [
{
"finding_id": "sec-001-a1b2c3d4",
"related_dimensions": ["quality", "architecture"],
"reason": "Same file flagged in multiple dimensions"
}
]
}
]

View File

@@ -0,0 +1,166 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Issue Solution Schema",
"description": "Schema for solution registered to an issue",
"type": "object",
"required": ["id", "tasks", "is_bound", "created_at"],
"properties": {
"id": {
"type": "string",
"description": "Unique solution identifier: SOL-{issue-id}-{4-char-uid} where uid is 4 alphanumeric chars",
"pattern": "^SOL-.+-[a-z0-9]{4}$",
"examples": ["SOL-GH-123-a7x9", "SOL-ISS-20251229-001-b2k4"]
},
"description": {
"type": "string",
"description": "High-level summary of the solution"
},
"approach": {
"type": "string",
"description": "Technical approach or strategy"
},
"tasks": {
"type": "array",
"description": "Task breakdown for this solution",
"items": {
"type": "object",
"required": ["id", "title", "scope", "action", "implementation", "acceptance"],
"properties": {
"id": {
"type": "string",
"pattern": "^T[0-9]+$"
},
"title": {
"type": "string",
"description": "Action verb + target"
},
"scope": {
"type": "string",
"description": "Module path or feature area"
},
"action": {
"type": "string",
"enum": ["Create", "Update", "Implement", "Refactor", "Add", "Delete", "Configure", "Test", "Fix"]
},
"description": {
"type": "string",
"description": "1-2 sentences describing what to implement"
},
"modification_points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": { "type": "string" },
"target": { "type": "string" },
"change": { "type": "string" }
}
}
},
"implementation": {
"type": "array",
"items": { "type": "string" },
"description": "Step-by-step implementation guide"
},
"test": {
"type": "object",
"description": "Test requirements",
"properties": {
"unit": { "type": "array", "items": { "type": "string" } },
"integration": { "type": "array", "items": { "type": "string" } },
"commands": { "type": "array", "items": { "type": "string" } },
"coverage_target": { "type": "number" }
}
},
"regression": {
"type": "array",
"items": { "type": "string" },
"description": "Regression check points"
},
"acceptance": {
"type": "object",
"description": "Acceptance criteria & verification",
"required": ["criteria", "verification"],
"properties": {
"criteria": { "type": "array", "items": { "type": "string" } },
"verification": { "type": "array", "items": { "type": "string" } },
"manual_checks": { "type": "array", "items": { "type": "string" } }
}
},
"commit": {
"type": "object",
"description": "Commit specification",
"properties": {
"type": { "type": "string", "enum": ["feat", "fix", "refactor", "test", "docs", "chore"] },
"scope": { "type": "string" },
"message_template": { "type": "string" },
"breaking": { "type": "boolean" }
}
},
"depends_on": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Task IDs this task depends on"
},
"estimated_minutes": {
"type": "integer",
"description": "Estimated time to complete"
},
"status": {
"type": "string",
"description": "Task status (optional, for tracking)"
},
"priority": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"default": 3
}
}
}
},
"exploration_context": {
"type": "object",
"description": "ACE exploration results",
"properties": {
"project_structure": { "type": "string" },
"relevant_files": {
"type": "array",
"items": { "type": "string" }
},
"patterns": { "type": "string" },
"integration_points": { "type": "string" }
}
},
"analysis": {
"type": "object",
"description": "Solution risk assessment",
"properties": {
"risk": { "type": "string", "enum": ["low", "medium", "high"] },
"impact": { "type": "string", "enum": ["low", "medium", "high"] },
"complexity": { "type": "string", "enum": ["low", "medium", "high"] }
}
},
"score": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Solution quality score (0.0-1.0)"
},
"is_bound": {
"type": "boolean",
"default": false,
"description": "Whether this solution is bound to the issue"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"bound_at": {
"type": "string",
"format": "date-time",
"description": "When this solution was bound to the issue"
}
}
}

View File

@@ -0,0 +1,158 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Plan Verification Findings Schema",
"description": "Schema for plan verification findings output from cli-explore-agent",
"type": "object",
"required": [
"session_id",
"timestamp",
"verification_tiers_completed",
"findings",
"summary"
],
"properties": {
"session_id": {
"type": "string",
"description": "Workflow session ID (e.g., WFS-20250127-143000)",
"pattern": "^WFS-[0-9]{8}-[0-9]{6}$"
},
"timestamp": {
"type": "string",
"description": "ISO 8601 timestamp when verification was completed",
"format": "date-time"
},
"verification_tiers_completed": {
"type": "array",
"description": "List of verification tiers completed (e.g., ['Tier 1', 'Tier 2'])",
"items": {
"type": "string",
"enum": ["Tier 1", "Tier 2", "Tier 3", "Tier 4"]
},
"minItems": 1,
"maxItems": 4
},
"findings": {
"type": "array",
"description": "Array of all findings across all dimensions",
"items": {
"type": "object",
"required": [
"id",
"dimension",
"dimension_name",
"severity",
"location",
"summary",
"recommendation"
],
"properties": {
"id": {
"type": "string",
"description": "Unique finding ID prefixed by severity (C1, H1, M1, L1)",
"pattern": "^[CHML][0-9]+$"
},
"dimension": {
"type": "string",
"description": "Verification dimension identifier",
"enum": ["A", "B", "C", "D", "E", "F", "G", "H"]
},
"dimension_name": {
"type": "string",
"description": "Human-readable dimension name",
"enum": [
"User Intent Alignment",
"Requirements Coverage Analysis",
"Consistency Validation",
"Dependency Integrity",
"Synthesis Alignment",
"Task Specification Quality",
"Duplication Detection",
"Feasibility Assessment"
]
},
"severity": {
"type": "string",
"description": "Severity level of the finding",
"enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
},
"location": {
"type": "array",
"description": "Array of locations where issue was found (e.g., 'IMPL_PLAN.md:L45', 'task:IMPL-1.2', 'synthesis:FR-03')",
"items": {
"type": "string"
},
"minItems": 1
},
"summary": {
"type": "string",
"description": "Concise summary of the issue (1-2 sentences)",
"minLength": 10,
"maxLength": 500
},
"recommendation": {
"type": "string",
"description": "Actionable recommendation to resolve the issue",
"minLength": 10,
"maxLength": 500
}
}
}
},
"summary": {
"type": "object",
"description": "Aggregate summary of verification results",
"required": [
"critical_count",
"high_count",
"medium_count",
"low_count",
"total_findings",
"coverage_percentage",
"recommendation"
],
"properties": {
"critical_count": {
"type": "integer",
"description": "Number of critical severity findings",
"minimum": 0
},
"high_count": {
"type": "integer",
"description": "Number of high severity findings",
"minimum": 0
},
"medium_count": {
"type": "integer",
"description": "Number of medium severity findings",
"minimum": 0
},
"low_count": {
"type": "integer",
"description": "Number of low severity findings",
"minimum": 0
},
"total_findings": {
"type": "integer",
"description": "Total number of findings",
"minimum": 0
},
"coverage_percentage": {
"type": "number",
"description": "Percentage of synthesis requirements covered by tasks (0-100)",
"minimum": 0,
"maximum": 100
},
"recommendation": {
"type": "string",
"description": "Quality gate recommendation",
"enum": [
"BLOCK_EXECUTION",
"PROCEED_WITH_FIXES",
"PROCEED_WITH_CAUTION",
"PROCEED"
]
}
}
}
}
}

View File

@@ -0,0 +1,247 @@
{
"$schema": "https://tr.designtokens.org/format/",
"duration": {
"$type": "duration",
"instant": { "$value": "0ms" },
"fast": { "$value": "150ms" },
"normal": { "$value": "300ms" },
"slow": { "$value": "500ms" },
"slower": { "$value": "1000ms" }
},
"easing": {
"$type": "cubicBezier",
"linear": { "$value": "linear" },
"ease-in": { "$value": "cubic-bezier(0.4, 0, 1, 1)" },
"ease-out": { "$value": "cubic-bezier(0, 0, 0.2, 1)" },
"ease-in-out": { "$value": "cubic-bezier(0.4, 0, 0.2, 1)" },
"spring": { "$value": "cubic-bezier(0.68, -0.55, 0.265, 1.55)" },
"bounce": { "$value": "cubic-bezier(0.68, -0.6, 0.32, 1.6)" }
},
"keyframes": {
"_comment_pattern": "Define pairs (in/out, open/close, enter/exit)",
"_comment_required": "Required keyframes for components",
"fade-in": {
"0%": { "opacity": "0" },
"100%": { "opacity": "1" }
},
"fade-out": {
"_comment": "reverse of fade-in",
"0%": { "opacity": "1" },
"100%": { "opacity": "0" }
},
"slide-up": {
"0%": { "transform": "translateY(10px)", "opacity": "0" },
"100%": { "transform": "translateY(0)", "opacity": "1" }
},
"slide-down": {
"_comment": "reverse direction",
"0%": { "transform": "translateY(0)", "opacity": "1" },
"100%": { "transform": "translateY(10px)", "opacity": "0" }
},
"scale-in": {
"0%": { "transform": "scale(0.95)", "opacity": "0" },
"100%": { "transform": "scale(1)", "opacity": "1" }
},
"scale-out": {
"_comment": "reverse of scale-in",
"0%": { "transform": "scale(1)", "opacity": "1" },
"100%": { "transform": "scale(0.95)", "opacity": "0" }
},
"accordion-down": {
"0%": { "height": "0", "opacity": "0" },
"100%": { "height": "var(--radix-accordion-content-height)", "opacity": "1" }
},
"accordion-up": {
"_comment": "reverse",
"0%": { "height": "var(--radix-accordion-content-height)", "opacity": "1" },
"100%": { "height": "0", "opacity": "0" }
},
"dialog-open": {
"0%": { "transform": "translate(-50%, -48%) scale(0.96)", "opacity": "0" },
"100%": { "transform": "translate(-50%, -50%) scale(1)", "opacity": "1" }
},
"dialog-close": {
"_comment": "reverse",
"0%": { "transform": "translate(-50%, -50%) scale(1)", "opacity": "1" },
"100%": { "transform": "translate(-50%, -48%) scale(0.96)", "opacity": "0" }
},
"dropdown-open": {
"0%": { "transform": "scale(0.95) translateY(-4px)", "opacity": "0" },
"100%": { "transform": "scale(1) translateY(0)", "opacity": "1" }
},
"dropdown-close": {
"_comment": "reverse",
"0%": { "transform": "scale(1) translateY(0)", "opacity": "1" },
"100%": { "transform": "scale(0.95) translateY(-4px)", "opacity": "0" }
},
"toast-enter": {
"0%": { "transform": "translateX(100%)", "opacity": "0" },
"100%": { "transform": "translateX(0)", "opacity": "1" }
},
"toast-exit": {
"_comment": "reverse",
"0%": { "transform": "translateX(0)", "opacity": "1" },
"100%": { "transform": "translateX(100%)", "opacity": "0" }
},
"spin": {
"0%": { "transform": "rotate(0deg)" },
"100%": { "transform": "rotate(360deg)" }
},
"pulse": {
"0%, 100%": { "opacity": "1" },
"50%": { "opacity": "0.5" }
}
},
"interactions": {
"_comment_pattern": "Define for each interactive component state",
"_structure": {
"property": "string - CSS properties (comma-separated)",
"duration": "{duration.*}",
"easing": "{easing.*}"
},
"button-hover": {
"property": "background-color, transform",
"duration": "{duration.fast}",
"easing": "{easing.ease-out}"
},
"button-active": {
"property": "transform",
"duration": "{duration.instant}",
"easing": "{easing.ease-in}"
},
"card-hover": {
"property": "box-shadow, transform",
"duration": "{duration.normal}",
"easing": "{easing.ease-in-out}"
},
"input-focus": {
"property": "border-color, box-shadow",
"duration": "{duration.fast}",
"easing": "{easing.ease-out}"
},
"dropdown-toggle": {
"property": "opacity, transform",
"duration": "{duration.fast}",
"easing": "{easing.ease-out}"
},
"accordion-toggle": {
"property": "height, opacity",
"duration": "{duration.normal}",
"easing": "{easing.ease-in-out}"
},
"dialog-toggle": {
"property": "opacity, transform",
"duration": "{duration.normal}",
"easing": "{easing.spring}"
},
"tabs-switch": {
"property": "color, border-color",
"duration": "{duration.fast}",
"easing": "{easing.ease-in-out}"
}
},
"transitions": {
"default": { "$value": "all {duration.normal} {easing.ease-in-out}" },
"colors": { "$value": "color {duration.fast} {easing.linear}, background-color {duration.fast} {easing.linear}" },
"transform": { "$value": "transform {duration.normal} {easing.spring}" },
"opacity": { "$value": "opacity {duration.fast} {easing.linear}" },
"all-smooth": { "$value": "all {duration.slow} {easing.ease-in-out}" }
},
"component_animations": {
"_comment_pattern": "Map each component to its animations - MUST match design-tokens.json component list",
"_structure": {
"stateOrInteraction": {
"animation": "keyframe-name {duration.*} {easing.*} OR none",
"transition": "{interactions.*} OR none"
}
},
"button": {
"hover": { "animation": "none", "transition": "{interactions.button-hover}" },
"active": { "animation": "none", "transition": "{interactions.button-active}" }
},
"card": {
"hover": { "animation": "none", "transition": "{interactions.card-hover}" }
},
"input": {
"focus": { "animation": "none", "transition": "{interactions.input-focus}" }
},
"dialog": {
"open": { "animation": "dialog-open {duration.normal} {easing.spring}" },
"close": { "animation": "dialog-close {duration.normal} {easing.ease-in}" }
},
"dropdown": {
"open": { "animation": "dropdown-open {duration.fast} {easing.ease-out}" },
"close": { "animation": "dropdown-close {duration.fast} {easing.ease-in}" }
},
"toast": {
"enter": { "animation": "toast-enter {duration.normal} {easing.ease-out}" },
"exit": { "animation": "toast-exit {duration.normal} {easing.ease-in}" }
},
"accordion": {
"open": { "animation": "accordion-down {duration.normal} {easing.ease-out}" },
"close": { "animation": "accordion-up {duration.normal} {easing.ease-in}" }
},
"_comment_missing": "Add mappings for: tabs, switch, checkbox, badge, alert"
},
"accessibility": {
"prefers_reduced_motion": {
"duration": "0ms",
"keyframes": {},
"note": "Disable animations when user prefers reduced motion",
"css_rule": "@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }"
}
},
"_metadata": {
"version": "string",
"created": "ISO timestamp",
"source": "code-import|explore|text",
"code_snippets": [
{
"animation_name": "string - keyframe/transition name",
"source_file": "string - absolute path",
"line_start": "number",
"line_end": "number",
"snippet": "string - complete @keyframes or transition code",
"context_type": "css-keyframes|css-transition|js-animation|scss-animation|etc"
}
]
},
"_field_rules": {
"schema": "$schema MUST reference W3C Design Tokens format specification",
"duration_wrapper": "All duration values MUST use $value wrapper with ms units",
"easing_wrapper": "All easing values MUST use $value wrapper with standard CSS easing or cubic-bezier()",
"keyframes": "keyframes MUST define complete component state animations (open/close, enter/exit)",
"interactions_refs": "interactions MUST reference duration and easing using {token.path} syntax",
"component_mapping": "component_animations MUST map component states to specific keyframes and transitions",
"component_coverage": "component_animations MUST be defined for all interactive and stateful components",
"transitions_wrapper": "transitions MUST use $value wrapper for complete transition definitions",
"accessibility": "accessibility.prefers_reduced_motion MUST be included with CSS media query rule",
"code_snippets": "_metadata.code_snippets ONLY present in Code Import mode"
},
"_animation_component_integration": {
"requirement": "Each component in design-tokens.json component section MUST have corresponding entry in component_animations",
"state_based": "State-based animations (dialog.open, accordion.close) MUST use keyframe animations",
"interaction": "Interaction animations (button.hover, input.focus) MUST use transitions",
"consistency": "All animation references use {token.path} syntax for consistency"
}
}

View File

@@ -0,0 +1,342 @@
{
"$schema": "https://tr.designtokens.org/format/",
"name": "string - Token set name",
"description": "string - Token set description",
"color": {
"background": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" }, "$description": "optional" },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"card": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"card-foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"border": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"input": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"ring": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"interactive": {
"primary": {
"default": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"hover": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"active": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"disabled": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
},
"secondary": {
"_comment": "Same structure as primary",
"default": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"hover": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"active": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"disabled": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
},
"accent": {
"_comment": "Same structure (no disabled state)",
"default": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"hover": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"active": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
},
"destructive": {
"_comment": "Same structure (no active/disabled states)",
"default": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"hover": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
}
},
"muted": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"muted-foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"chart": {
"1": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"2": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"3": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"4": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"5": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
},
"sidebar": {
"background": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"primary": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"primary-foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"accent": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"accent-foreground": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"border": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } },
"ring": { "$type": "color", "$value": { "light": "oklch(...)", "dark": "oklch(...)" } }
}
},
"typography": {
"font_families": {
"sans": "string - 'Font Name', fallback1, fallback2",
"serif": "string",
"mono": "string"
},
"font_sizes": {
"xs": "0.75rem",
"sm": "0.875rem",
"base": "1rem",
"lg": "1.125rem",
"xl": "1.25rem",
"2xl": "1.5rem",
"3xl": "1.875rem",
"4xl": "2.25rem"
},
"line_heights": {
"tight": "number",
"normal": "number",
"relaxed": "number"
},
"letter_spacing": {
"tight": "string",
"normal": "string",
"wide": "string"
},
"combinations": [
{
"name": "h1|h2|h3|h4|h5|h6|body|caption",
"font_family": "sans|serif|mono",
"font_size": "string - reference to font_sizes",
"font_weight": "number - 400|500|600|700",
"line_height": "string",
"letter_spacing": "string"
}
]
},
"spacing": {
"0": "0",
"1": "0.25rem",
"2": "0.5rem",
"3": "0.75rem",
"4": "1rem",
"6": "1.5rem",
"8": "2rem",
"12": "3rem",
"16": "4rem",
"20": "5rem",
"24": "6rem",
"32": "8rem",
"40": "10rem",
"48": "12rem",
"56": "14rem",
"64": "16rem"
},
"opacity": {
"disabled": "0.5",
"hover": "0.8",
"active": "1"
},
"shadows": {
"2xs": "string - CSS shadow value",
"xs": "string",
"sm": "string",
"DEFAULT": "string",
"md": "string",
"lg": "string",
"xl": "string",
"2xl": "string"
},
"border_radius": {
"sm": "string - calc() or fixed",
"md": "string",
"lg": "string",
"xl": "string",
"DEFAULT": "string"
},
"breakpoints": {
"sm": "640px",
"md": "768px",
"lg": "1024px",
"xl": "1280px",
"2xl": "1536px"
},
"component": {
"_comment_pattern": "COMPONENT PATTERN - Apply to: button, card, input, dialog, dropdown, toast, accordion, tabs, switch, checkbox, badge, alert",
"_example_button": {
"$type": "component",
"base": {
"_comment": "Layout properties using camelCase",
"display": "inline-flex|flex|block",
"alignItems": "center",
"borderRadius": "{border_radius.md}",
"transition": "{transitions.default}"
},
"size": {
"small": { "height": "32px", "padding": "{spacing.2} {spacing.3}", "fontSize": "{typography.font_sizes.xs}" },
"default": { "height": "40px", "padding": "{spacing.2} {spacing.4}" },
"large": { "height": "48px", "padding": "{spacing.3} {spacing.6}", "fontSize": "{typography.font_sizes.base}" }
},
"variant": {
"variantName": {
"default": { "backgroundColor": "{color.interactive.primary.default}", "color": "{color.interactive.primary.foreground}" },
"hover": { "backgroundColor": "{color.interactive.primary.hover}" },
"active": { "backgroundColor": "{color.interactive.primary.active}" },
"disabled": { "backgroundColor": "{color.interactive.primary.disabled}", "opacity": "{opacity.disabled}", "cursor": "not-allowed" },
"focus": { "outline": "2px solid {color.ring}", "outlineOffset": "2px" }
}
},
"state": {
"_comment": "For stateful components (dialog, accordion, etc.)",
"open": { "animation": "{animation.name.component-open} {animation.duration.normal} {animation.easing.ease-out}" },
"closed": { "animation": "{animation.name.component-close} {animation.duration.normal} {animation.easing.ease-in}" }
}
}
},
"elevation": {
"$type": "elevation",
"base": { "$value": "0" },
"overlay": { "$value": "40" },
"dropdown": { "$value": "50" },
"dialog": { "$value": "50" },
"tooltip": { "$value": "60" }
},
"_metadata": {
"version": "string - W3C version or custom version",
"created": "ISO timestamp - 2024-01-01T00:00:00Z",
"source": "code-import|explore|text",
"theme_colors_guide": {
"description": "Theme colors are the core brand identity colors that define the visual hierarchy and emotional tone of the design system",
"primary": {
"role": "Main brand color",
"usage": "Primary actions (CTAs, key interactive elements, navigation highlights, primary buttons)",
"contrast_requirement": "WCAG AA - 4.5:1 for text, 3:1 for UI components"
},
"secondary": {
"role": "Supporting brand color",
"usage": "Secondary actions and complementary elements (less prominent buttons, secondary navigation, supporting features)",
"principle": "Should complement primary without competing for attention"
},
"accent": {
"role": "Highlight color for emphasis",
"usage": "Attention-grabbing elements used sparingly (badges, notifications, special promotions, highlights)",
"principle": "Should create strong visual contrast to draw focus"
},
"destructive": {
"role": "Error and destructive action color",
"usage": "Delete buttons, error messages, critical warnings",
"principle": "Must signal danger or caution clearly"
},
"harmony_note": "All theme colors must work harmoniously together and align with brand identity. In multi-file extraction, prioritize definitions with semantic comments explaining brand intent."
},
"conflicts": [
{
"token_name": "string - which token has conflicts",
"category": "string - colors|typography|etc",
"definitions": [
{
"value": "string - token value",
"source_file": "string - absolute path",
"line_number": "number",
"context": "string - surrounding comment or null",
"semantic_intent": "string - interpretation of definition"
}
],
"selected_value": "string - final chosen value",
"selection_reason": "string - why this value was chosen"
}
],
"code_snippets": [
{
"category": "colors|typography|spacing|shadows|border_radius|component",
"token_name": "string - which token this snippet defines",
"source_file": "string - absolute path",
"line_start": "number",
"line_end": "number",
"snippet": "string - complete code block",
"context_type": "css-variable|css-class|js-object|scss-variable|etc"
}
],
"usage_recommendations": {
"typography": {
"common_sizes": {
"small_text": "sm (0.875rem)",
"body_text": "base (1rem)",
"heading": "2xl-4xl"
},
"common_combinations": [
{
"name": "Heading + Body",
"heading": "2xl",
"body": "base",
"use_case": "Article sections"
}
]
},
"spacing": {
"size_guide": {
"tight": "1-2 (0.25rem-0.5rem)",
"normal": "4-6 (1rem-1.5rem)",
"loose": "8-12 (2rem-3rem)"
},
"common_patterns": [
{
"pattern": "padding-4 margin-bottom-6",
"use_case": "Card content spacing",
"pixel_value": "1rem padding, 1.5rem margin"
}
]
}
}
},
"_field_rules": {
"schema": "$schema MUST reference W3C Design Tokens format specification",
"colors": "All color values MUST use OKLCH format with light/dark mode values",
"types": "All tokens MUST include $type metadata (color, dimension, duration, component, elevation)",
"states": "Color tokens MUST include interactive states (default, hover, active, disabled) where applicable",
"fonts": "Typography font_families MUST include Google Fonts with fallback stacks",
"spacing": "Spacing MUST use systematic scale (multiples of 0.25rem base unit)",
"components": "Component definitions MUST be structured objects referencing other tokens via {token.path} syntax",
"component_states": "Component definitions MUST include state-based styling (default, hover, active, focus, disabled)",
"elevation": "elevation z-index values MUST be defined for layered components (overlay, dropdown, dialog, tooltip)",
"metadata_guide": "_metadata.theme_colors_guide RECOMMENDED in all modes to help users understand theme color roles and usage",
"metadata_conflicts": "_metadata.conflicts MANDATORY in Code Import mode when conflicting definitions detected",
"metadata_snippets": "_metadata.code_snippets ONLY present in Code Import mode",
"metadata_recommendations": "_metadata.usage_recommendations RECOMMENDED for universal components"
},
"_required_components": {
"_comment": "12+ components required, use pattern above",
"button": "5 variants (primary, secondary, destructive, outline, ghost) + 3 sizes + states (default, hover, active, disabled, focus)",
"card": "2 variants (default, interactive) + hover animations",
"input": "states (default, focus, disabled, error) + 3 sizes",
"dialog": "overlay + content + states (open, closed with animations)",
"dropdown": "trigger (references button) + content + item (with states) + states (open, closed)",
"toast": "2 variants (default, destructive) + states (enter, exit with animations)",
"accordion": "trigger + content + states (open, closed with animations)",
"tabs": "list + trigger (states: default, hover, active, disabled) + content",
"switch": "root + thumb + states (checked, disabled)",
"checkbox": "states (default, checked, disabled, focus)",
"badge": "4 variants (default, secondary, destructive, outline)",
"alert": "2 variants (default, destructive)"
},
"_token_reference_syntax": {
"_comment": "Use {token.path} to reference other tokens",
"examples": [
"{color.interactive.primary.default}",
"{spacing.4}",
"{typography.font_sizes.sm}"
],
"resolution": "References are resolved during CSS generation",
"nested": "Supports nested references (e.g., {component.button.base})"
},
"_conflict_resolution_rules": {
"_comment": "Code Import Mode only",
"detect": "MUST detect when same token has different values across files",
"read": "MUST read semantic comments (/* ... */) surrounding definitions",
"prioritize": "MUST prioritize definitions with semantic intent over bare values",
"record": "MUST record ALL definitions in conflicts array, not just selected one",
"explain": "MUST explain selection_reason referencing semantic context",
"verify": "For core theme tokens (primary, secondary, accent): MUST verify selected value aligns with overall color scheme described in comments"
}
}

View File

@@ -0,0 +1,145 @@
{
"$schema": "https://tr.designtokens.org/format/",
"templates": [
{
"target": "string - page/component name (e.g., hero-section, product-card)",
"description": "string - layout description",
"component_type": "universal|specialized",
"device_type": "mobile|tablet|desktop|responsive",
"layout_strategy": "string - grid-3col|flex-row|stack|sidebar|etc",
"structure": {
"tag": "string - HTML5 semantic tag (header|nav|main|section|article|aside|footer|div|etc)",
"attributes": {
"class": "string - semantic class name",
"role": "string - ARIA role (navigation|main|complementary|etc)",
"aria-label": "string - ARIA label",
"aria-describedby": "string - ARIA describedby",
"data-state": "string - data attributes for state management (open|closed|etc)"
},
"layout": {
"_comment": "LAYOUT PROPERTIES ONLY - Use camelCase for property names",
"display": "grid|flex|block|inline-flex",
"grid-template-columns": "{spacing.*} or CSS value (repeat(3, 1fr))",
"grid-template-rows": "string",
"gap": "{spacing.*}",
"padding": "{spacing.*}",
"margin": "{spacing.*}",
"alignItems": "start|center|end|stretch",
"justifyContent": "start|center|end|space-between|space-around",
"flexDirection": "row|column",
"flexWrap": "wrap|nowrap",
"position": "relative|absolute|fixed|sticky",
"top": "string",
"right": "string",
"bottom": "string",
"left": "string",
"width": "string",
"height": "string",
"maxWidth": "string",
"minHeight": "string"
},
"responsive": {
"_comment": "ONLY properties that CHANGE at each breakpoint - NO repetition",
"sm": {
"grid-template-columns": "1fr",
"padding": "{spacing.4}"
},
"md": {
"grid-template-columns": "repeat(2, 1fr)",
"gap": "{spacing.6}"
},
"lg": {
"grid-template-columns": "repeat(3, 1fr)"
}
},
"children": [
{
"_comment": "Recursive structure - same fields as parent",
"tag": "string",
"attributes": {},
"layout": {},
"responsive": {},
"children": [],
"content": "string or {{placeholder}}"
}
],
"content": "string - text content or {{placeholder}} for dynamic content"
},
"accessibility": {
"patterns": [
"string - ARIA patterns used (e.g., WAI-ARIA Tabs pattern, Dialog pattern)"
],
"keyboard_navigation": [
"string - keyboard shortcuts (e.g., Tab/Shift+Tab navigation, Escape to close)"
],
"focus_management": "string - focus trap strategy, initial focus target",
"screen_reader_notes": [
"string - screen reader announcements (e.g., Dialog opened, Tab selected)"
]
},
"usage_guide": {
"common_sizes": {
"small": {
"dimensions": "string - e.g., px-3 py-1.5 (height: ~32px)",
"use_case": "string - Compact UI, mobile views"
},
"medium": {
"dimensions": "string - e.g., px-4 py-2 (height: ~40px)",
"use_case": "string - Default size for most contexts"
},
"large": {
"dimensions": "string - e.g., px-6 py-3 (height: ~48px)",
"use_case": "string - Prominent CTAs, hero sections"
}
},
"variant_recommendations": {
"variant_name": {
"description": "string - when to use this variant",
"typical_actions": ["string - action examples"]
}
},
"usage_context": [
"string - typical usage scenarios (e.g., Landing page hero, Product listing grid)"
],
"accessibility_tips": [
"string - accessibility best practices (e.g., Ensure heading hierarchy, Add aria-label)"
]
},
"extraction_metadata": {
"source": "code-import|explore|text",
"created": "ISO timestamp",
"code_snippets": [
{
"component_name": "string - which layout component",
"source_file": "string - absolute path",
"line_start": "number",
"line_end": "number",
"snippet": "string - complete HTML/CSS/JS code block",
"context_type": "html-structure|css-utility|react-component|vue-component|etc"
}
]
}
}
],
"_field_rules": {
"schema": "$schema MUST reference W3C Design Tokens format specification",
"semantic_tags": "structure.tag MUST use semantic HTML5 tags (header, nav, main, section, article, aside, footer)",
"aria": "structure.attributes MUST include ARIA attributes where applicable (role, aria-label, aria-describedby)",
"token_refs": "structure.layout MUST use {token.path} syntax for all spacing values",
"no_visual": "structure.layout MUST NOT include visual styling (colors, fonts, shadows - those belong in design-tokens)",
"layout_only": "structure.layout contains ONLY layout properties (display, grid, flex, position, spacing)",
"breakpoints": "structure.responsive MUST define breakpoint-specific overrides matching breakpoint tokens",
"no_repetition": "structure.responsive uses ONLY the properties that change at each breakpoint (no repetition)",
"recursive": "structure.children inherits same structure recursively for nested elements",
"component_type": "component_type MUST be 'universal' or 'specialized'",
"accessibility": "accessibility MUST include patterns, keyboard_navigation, focus_management, screen_reader_notes",
"usage_guide_universal": "usage_guide REQUIRED for universal components (buttons, inputs, forms, cards, navigation, etc.)",
"usage_guide_specialized": "usage_guide OPTIONAL for specialized components (can be simplified or omitted)",
"code_snippets": "extraction_metadata.code_snippets ONLY present in Code Import mode"
}
}

View File

@@ -0,0 +1,538 @@
# CLI Tools Execution Specification
## Table of Contents
1. [Configuration Reference](#configuration-reference)
2. [Tool Selection](#tool-selection)
3. [Prompt Template](#prompt-template)
4. [CLI Execution](#cli-execution)
5. [Auto-Invoke Triggers](#auto-invoke-triggers)
6. [Best Practices](#best-practices)
---
## Configuration Reference
### Configuration File
**Path**: `~/.claude/cli-tools.json`
All tool availability, model selection, and routing are defined in this configuration file.
### Configuration Fields
| Field | Description |
|-------|-------------|
| `enabled` | Tool availability status |
| `primaryModel` | Default model for the tool |
| `secondaryModel` | Fallback model |
| `tags` | Capability tags for routing |
### Tool Types
| Type | Usage | Capabilities |
|------|-------|--------------|
| `builtin` | `--tool gemini` | Full (analysis + write tools) |
| `cli-wrapper` | `--tool doubao` | Full (analysis + write tools) |
| `api-endpoint` | `--tool g25` | **Analysis only** (no file write tools) |
> **Note**: `api-endpoint` tools only support analysis and code generation responses. They cannot create, modify, or delete files.
---
## Tool Selection
### Tag-Based Routing
Tools are selected based on **tags** defined in the configuration. Use tags to match task requirements to tool capabilities.
#### Common Tags
| Tag | Use Case |
|-----|----------|
| `analysis` | Code review, architecture analysis, exploration |
| `implementation` | Feature development, bug fixes |
| `documentation` | Doc generation, comments |
| `testing` | Test creation, coverage analysis |
| `refactoring` | Code restructuring |
| `security` | Security audits, vulnerability scanning |
### Selection Algorithm
```
1. Parse task intent → extract required capabilities
2. Load cli-tools.json → get enabled tools with tags
3. Match tags → filter tools supporting required capabilities
4. Select tool → choose by priority (explicit > tag-match > default)
5. Select model → use primaryModel, fallback to secondaryModel
```
### Selection Decision Tree
```
┌─ Explicit --tool specified?
│ └─→ YES: Use specified tool (validate enabled)
└─ NO: Tag-based selection
├─ Task requires tags?
│ └─→ Match tools with matching tags
│ └─→ Multiple matches? Use first enabled
└─ No tag match?
└─→ Use default tool (first enabled in config)
```
### Command Structure
```bash
# Explicit tool selection
ccw cli -p "<PROMPT>" --tool <tool-id> --mode <analysis|write|review>
# Model override
ccw cli -p "<PROMPT>" --tool <tool-id> --model <model-id> --mode <analysis|write>
# Code review (codex only)
ccw cli -p "<PROMPT>" --tool codex --mode review
# Tag-based auto-selection (future)
ccw cli -p "<PROMPT>" --tags <tag1,tag2> --mode <analysis|write>
```
### Tool Fallback Chain
When primary tool fails or is unavailable:
1. Check `secondaryModel` for same tool
2. Try next enabled tool with matching tags
3. Fall back to default enabled tool
---
## Prompt Template
### Universal Prompt Template
```bash
ccw cli -p "PURPOSE: [what] + [why] + [success criteria] + [constraints/scope]
TASK: • [step 1: specific action] • [step 2: specific action] • [step 3: specific action]
MODE: [analysis|write]
CONTEXT: @[file patterns] | Memory: [session/tech/module context]
EXPECTED: [deliverable format] + [quality criteria] + [structure requirements]
CONSTRAINTS: [domain constraints]" --tool <tool-id> --mode <analysis|write> --rule <category-template>
```
### Intent Capture Checklist (Before CLI Execution)
**⚠️ CRITICAL**: Before executing any CLI command, verify these intent dimensions:
**Intent Validation Questions**:
- [ ] Is the objective specific and measurable?
- [ ] Are success criteria defined?
- [ ] Is the scope clearly bounded?
- [ ] Are constraints and limitations stated?
- [ ] Is the expected output format clear?
- [ ] Is the action level (read/write) explicit?
### Template Structure
Every command MUST include these fields:
- **PURPOSE**
- Purpose: Goal + motivation + success
- Components: What + Why + Success Criteria + Constraints
- Bad Example: "Analyze code"
- Good Example: "Identify security vulnerabilities in auth module to pass compliance audit; success = all OWASP Top 10 addressed; scope = src/auth/** only"
- **TASK**
- Purpose: Actionable steps
- Components: Specific verbs + targets
- Bad Example: "• Review code • Find issues"
- Good Example: "• Scan for SQL injection in query builders • Check XSS in template rendering • Verify CSRF token validation"
- **MODE**
- Purpose: Permission level
- Components: analysis / write / auto
- Bad Example: (missing)
- Good Example: "analysis" or "write"
- **CONTEXT**
- Purpose: File scope + history
- Components: File patterns + Memory
- Bad Example: "@**/*"
- Good Example: "@src/auth/**/*.ts @shared/utils/security.ts \| Memory: Previous auth refactoring (WFS-001)"
- **EXPECTED**
- Purpose: Output specification
- Components: Format + Quality + Structure
- Bad Example: "Report"
- Good Example: "Markdown report with: severity levels (Critical/High/Medium/Low), file:line references, remediation code snippets, priority ranking"
- **CONSTRAINTS**
- Purpose: Domain-specific constraints
- Components: Scope limits, special requirements, focus areas
- Bad Example: (missing or too vague)
- Good Example: "Focus on authentication | Ignore test files | No breaking changes"
### CONTEXT Configuration
**Format**: `CONTEXT: [file patterns] | Memory: [memory context]`
#### File Patterns
- **`@**/*`**: All files (default)
- **`@src/**/*.ts`**: TypeScript in src
- **`@../shared/**/*`**: Sibling directory (requires `--includeDirs`)
- **`@CLAUDE.md`**: Specific file
#### Memory Context
Include when building on previous work:
```bash
# Cross-task reference
Memory: Building on auth refactoring (commit abc123), implementing refresh tokens
# Cross-module integration
Memory: Integration with auth module, using shared error patterns from @shared/utils/errors.ts
```
**Memory Sources**:
- **Related Tasks**: Previous refactoring, extensions, conflict resolution
- **Tech Stack Patterns**: Framework conventions, security guidelines
- **Cross-Module References**: Integration points, shared utilities, type dependencies
#### Pattern Discovery Workflow
For complex requirements, discover files BEFORE CLI execution:
```bash
# Step 1: Discover files (choose one method)
# Method A: ACE semantic search (recommended)
mcp__ace-tool__search_context(project_root_path="/path", query="React components with export")
# Method B: Ripgrep pattern search
rg "export.*Component" --files-with-matches --type ts
# Step 2: Build CONTEXT
CONTEXT: @components/Auth.tsx @types/auth.d.ts | Memory: Previous type refactoring
# Step 3: Execute CLI
ccw cli -p "..." --tool <tool-id> --mode analysis --cd src
```
### --rule Configuration
**Use `--rule` option to auto-load templates**:
```bash
ccw cli -p "..." --tool gemini --mode analysis --rule analysis-review-architecture
```
### Mode Protocol References
**`--rule` auto-loads Protocol based on mode**:
- `--mode analysis` → analysis-protocol.md
- `--mode write` → write-protocol.md
**Protocol Mapping**:
- **`analysis`** mode
- Permission: Read-only
- Constraint: No file create/modify/delete
- **`write`** mode
- Permission: Create/Modify/Delete files
- Constraint: Full workflow execution
### Template System
**Available `--rule` template names**:
**Universal**:
- `universal-rigorous-style` - Precise tasks
- `universal-creative-style` - Exploratory tasks
**Analysis**:
- `analysis-trace-code-execution` - Execution tracing
- `analysis-diagnose-bug-root-cause` - Bug diagnosis
- `analysis-analyze-code-patterns` - Code patterns
- `analysis-analyze-technical-document` - Document analysis
- `analysis-review-architecture` - Architecture review
- `analysis-review-code-quality` - Code review
- `analysis-analyze-performance` - Performance analysis
- `analysis-assess-security-risks` - Security assessment
**Planning**:
- `planning-plan-architecture-design` - Architecture design
- `planning-breakdown-task-steps` - Task breakdown
- `planning-design-component-spec` - Component design
- `planning-plan-migration-strategy` - Migration strategy
**Development**:
- `development-implement-feature` - Feature implementation
- `development-refactor-codebase` - Code refactoring
- `development-generate-tests` - Test generation
- `development-implement-component-ui` - UI component
- `development-debug-runtime-issues` - Runtime debugging
---
## CLI Execution
### MODE Options
- **`analysis`**
- Permission: Read-only
- Use For: Code review, architecture analysis, pattern discovery, exploration
- Specification: Safe for all tools
- **`write`**
- Permission: Create/Modify/Delete
- Use For: Feature implementation, bug fixes, documentation, code creation, file modifications
- Specification: Requires explicit `--mode write`
- **`review`**
- Permission: Read-only (code review output)
- Use For: Git-aware code review of uncommitted changes, branch diffs, specific commits
- Specification: **codex only** - uses `codex review` subcommand
- Tool Behavior:
- `codex`: Executes `codex review` for structured code review
- Other tools (gemini/qwen/claude): Accept mode but no operation change (treated as analysis)
- **Constraint**: Target flags (`--uncommitted`, `--base`, `--commit`) and prompt are mutually exclusive
- With prompt only: `ccw cli -p "Focus on security" --tool codex --mode review` (reviews uncommitted by default)
- With target flag only: `ccw cli --tool codex --mode review --commit abc123` (no prompt allowed)
### Command Options
- **`--tool <tool>`**
- Description: Tool from config (e.g., gemini, qwen, codex)
- Default: First enabled tool in config
- **`--mode <mode>`**
- Description: **REQUIRED**: analysis, write, review
- Default: **NONE** (must specify)
- Note: `review` mode triggers `codex review` subcommand for codex tool only
- **`--model <model>`**
- Description: Model override
- Default: Tool's primaryModel from config
- **`--cd <path>`**
- Description: Working directory
- Default: current
- **`--includeDirs <dirs>`**
- Description: Additional directories (comma-separated)
- Default: none
- **`--resume [id]`**
- Description: Resume previous session
- Default: -
- **`--rule <template>`**
- Description: Template name, auto-loads protocol + template appended to prompt
- Default: universal-rigorous-style
- Auto-selects protocol based on --mode
### Directory Configuration
#### Working Directory (`--cd`)
When using `--cd`:
- `@**/*` = Files within working directory tree only
- CANNOT reference parent/sibling via @ alone
- Must use `--includeDirs` for external directories
#### Include Directories (`--includeDirs`)
**TWO-STEP requirement for external files**:
1. Add `--includeDirs` parameter
2. Reference in CONTEXT with @ patterns
```bash
# Single directory
ccw cli -p "CONTEXT: @**/* @../shared/**/*" --tool <tool-id> --mode analysis --cd src/auth --includeDirs ../shared
# Multiple directories
ccw cli -p "..." --tool <tool-id> --mode analysis --cd src/auth --includeDirs ../shared,../types,../utils
```
**Rule**: If CONTEXT contains `@../dir/**/*`, MUST include `--includeDirs ../dir`
**Benefits**: Excludes unrelated directories, reduces token usage
### Session Resume
**When to Use**:
- Multi-round planning (analysis → planning → implementation)
- Multi-model collaboration (tool A → tool B on same topic)
- Topic continuity (building on previous findings)
**Usage**:
```bash
ccw cli -p "Continue analyzing" --tool <tool-id> --mode analysis --resume # Resume last
ccw cli -p "Fix issues found" --tool <tool-id> --mode write --resume <id> # Resume specific
ccw cli -p "Merge findings" --tool <tool-id> --mode analysis --resume <id1>,<id2> # Merge multiple
```
- **`--resume`**: Last session
- **`--resume <id>`**: Specific session
- **`--resume <id1>,<id2>`**: Merge sessions (comma-separated)
**Context Assembly** (automatic):
```
=== PREVIOUS CONVERSATION ===
USER PROMPT: [Previous prompt]
ASSISTANT RESPONSE: [Previous output]
=== CONTINUATION ===
[Your new prompt]
```
### Command Examples
#### Task-Type Specific Templates
**Analysis Task** (Security Audit):
```bash
ccw cli -p "PURPOSE: Identify OWASP Top 10 vulnerabilities in authentication module to pass security audit; success = all critical/high issues documented with remediation
TASK: • Scan for injection flaws (SQL, command, LDAP) • Check authentication bypass vectors • Evaluate session management • Assess sensitive data exposure
MODE: analysis
CONTEXT: @src/auth/**/* @src/middleware/auth.ts | Memory: Using bcrypt for passwords, JWT for sessions
EXPECTED: Security report with: severity matrix, file:line references, CVE mappings where applicable, remediation code snippets prioritized by risk
CONSTRAINTS: Focus on authentication | Ignore test files
" --tool gemini --mode analysis --rule analysis-assess-security-risks --cd src/auth
```
**Implementation Task** (New Feature):
```bash
ccw cli -p "PURPOSE: Implement rate limiting for API endpoints to prevent abuse; must be configurable per-endpoint; backward compatible with existing clients
TASK: • Create rate limiter middleware with sliding window • Implement per-route configuration • Add Redis backend for distributed state • Include bypass for internal services
MODE: write
CONTEXT: @src/middleware/**/* @src/config/**/* | Memory: Using Express.js, Redis already configured, existing middleware pattern in auth.ts
EXPECTED: Production-ready code with: TypeScript types, unit tests, integration test, configuration example, migration guide
CONSTRAINTS: Follow existing middleware patterns | No breaking changes
" --tool gemini --mode write --rule development-implement-feature
```
**Bug Fix Task**:
```bash
ccw cli -p "PURPOSE: Fix memory leak in WebSocket connection handler causing server OOM after 24h; root cause must be identified before any fix
TASK: • Trace connection lifecycle from open to close • Identify event listener accumulation • Check cleanup on disconnect • Verify garbage collection eligibility
MODE: analysis
CONTEXT: @src/websocket/**/* @src/services/connection-manager.ts | Memory: Using ws library, ~5000 concurrent connections in production
EXPECTED: Root cause analysis with: memory profile, leak source (file:line), fix recommendation with code, verification steps
CONSTRAINTS: Focus on resource cleanup
" --tool gemini --mode analysis --rule analysis-diagnose-bug-root-cause --cd src
```
**Refactoring Task**:
```bash
ccw cli -p "PURPOSE: Refactor payment processing to use strategy pattern for multi-gateway support; no functional changes; all existing tests must pass
TASK: • Extract gateway interface from current implementation • Create strategy classes for Stripe, PayPal • Implement factory for gateway selection • Migrate existing code to use strategies
MODE: write
CONTEXT: @src/payments/**/* @src/types/payment.ts | Memory: Currently only Stripe, adding PayPal next sprint, must support future gateways
EXPECTED: Refactored code with: strategy interface, concrete implementations, factory class, updated tests, migration checklist
CONSTRAINTS: Preserve all existing behavior | Tests must pass
" --tool gemini --mode write --rule development-refactor-codebase
```
**Code Review Task** (codex review mode):
```bash
# Option 1: Custom prompt (reviews uncommitted changes by default)
ccw cli -p "Focus on security vulnerabilities and error handling" --tool codex --mode review
# Option 2: Target flag only (no prompt allowed with target flags)
ccw cli --tool codex --mode review --uncommitted
ccw cli --tool codex --mode review --base main
ccw cli --tool codex --mode review --commit abc123
```
> **Note**: `--mode review` only triggers special behavior for `codex` tool. Target flags (`--uncommitted`, `--base`, `--commit`) and prompt are **mutually exclusive** - use one or the other, not both.
---
### Permission Framework
**Single-Use Authorization**: Each execution requires explicit user instruction. Previous authorization does NOT carry over.
**Mode Hierarchy**:
- `analysis`: Read-only, safe for auto-execution
- `write`: Create/Modify/Delete files, full operations - requires explicit `--mode write`
- `review`: Git-aware code review (codex only), read-only output - requires explicit `--mode review`
- **Exception**: User provides clear instructions like "modify", "create", "implement"
---
## Auto-Invoke Triggers
**Proactive CLI invocation** - Auto-invoke `ccw cli` when encountering these scenarios:
| Trigger Condition | Suggested Rule | When to Use |
|-------------------|----------------|-------------|
| **Self-repair fails** | `analysis-diagnose-bug-root-cause` | After 1+ failed fix attempts |
| **Ambiguous requirements** | `planning-breakdown-task-steps` | Task description lacks clarity |
| **Architecture decisions** | `planning-plan-architecture-design` | Complex feature needs design |
| **Pattern uncertainty** | `analysis-analyze-code-patterns` | Unsure of existing conventions |
| **Critical code paths** | `analysis-assess-security-risks` | Security/performance sensitive |
### Execution Principles
- **Default mode**: `--mode analysis` (read-only, safe for auto-execution)
- **No confirmation needed**: Invoke proactively when triggers match
- **Wait for results**: Complete analysis before next action
- **Tool selection**: Use context-appropriate tool or fallback chain (`gemini``qwen``codex`)
- **Rule flexibility**: Suggested rules are guidelines, not requirements - choose the most appropriate template for the situation
### Example: Bug Fix with Auto-Invoke
```bash
# After 1+ failed fix attempts, auto-invoke root cause analysis
ccw cli -p "PURPOSE: Identify root cause of [bug description]; success = actionable fix strategy
TASK: • Trace execution flow • Identify failure point • Analyze state at failure • Determine fix approach
MODE: analysis
CONTEXT: @src/module/**/* | Memory: Previous fix attempts failed at [location]
EXPECTED: Root cause analysis with: failure mechanism, stack trace interpretation, fix recommendation with code
CONSTRAINTS: Focus on [specific area]
" --tool gemini --mode analysis --rule analysis-diagnose-bug-root-cause
```
---
## Best Practices
### Core Principles
- **Configuration-driven** - All tool selection from `cli-tools.json`
- **Tag-based routing** - Match task requirements to tool capabilities
- **Use tools early and often** - Tools are faster and more thorough
- **Unified CLI** - Always use `ccw cli -p` for consistent parameter handling
- **Default mode is analysis** - Omit `--mode` for read-only operations, explicitly use `--mode write` for file modifications
- **Use `--rule` for templates** - Auto-loads protocol + template appended to prompt
- **Write protection** - Require EXPLICIT `--mode write` for file operations
### Workflow Principles
- **Use CCW unified interface** for all executions
- **Always include template** - Use `--rule <template-name>` to load templates
- **Be specific** - Clear PURPOSE, TASK, EXPECTED fields
- **Include constraints** - File patterns, scope in CONSTRAINTS
- **Leverage memory context** when building on previous work
- **Discover patterns first** - Use rg/MCP before CLI execution
- **Default to full context** - Use `@**/*` unless specific files needed
### Planning Checklist
- [ ] **Purpose defined** - Clear goal and intent
- [ ] **Mode selected** - `--mode analysis|write|review`
- [ ] **Context gathered** - File references + memory (default `@**/*`)
- [ ] **Directory navigation** - `--cd` and/or `--includeDirs`
- [ ] **Tool selected** - Explicit `--tool` or tag-based auto-selection
- [ ] **Rule template** - `--rule <template-name>` loads template
- [ ] **Constraints** - Domain constraints in CONSTRAINTS field
### Execution Workflow
1. **Load configuration** - Read `cli-tools.json` for available tools
2. **Match by tags** - Select tool based on task requirements
3. **Validate enabled** - Ensure selected tool is enabled
4. **Execute with mode** - Always specify `--mode analysis|write|review`
5. **Fallback gracefully** - Use secondary model or next matching tool on failure

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