Commit Graph

1429 Commits

Author SHA1 Message Date
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