Commit Graph

50 Commits

Author SHA1 Message Date
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
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
df104d6e9b feat: enforce synchronous exploration execution and update planning steps 2025-12-10 12:03:12 +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
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
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
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
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
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
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
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
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
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
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
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
19acaea0f9 feat: add exploration and plan JSON schemas for task context and planning 2025-11-24 21:57:19 +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
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
7bcf7f24a3 refactor(workflow): reorganize lite-plan and lite-execute docs for improved clarity
Restructure lite-plan.md (844→668 lines, -176) and lite-execute.md (597→569 lines, -28) following agent document patterns. Move Data Structures sections to end as reference, simplify repeated content, improve hierarchical organization. All original content preserved.

Key changes:
- Data Structures moved to end (from beginning)
- Simplified Execution Process to avoid duplication
- Improved section hierarchy and flow
- Consistent structure across both documents
2025-11-17 22:10:44 +08:00
catlog22
0a6c90c345 refactor(lite-plan): remove timeout and color attributes for streamlined configuration 2025-11-17 22:05:29 +08:00
catlog22
9cb9b2213b fix(lite-plan): correct executionContext.planObject.tasks type documentation
Issue found by Gemini analysis:
- executionContext.planObject.tasks was incorrectly documented as string[]
- Actual runtime structure is array of structured task objects (7 fields)
- This caused documentation mismatch between lite-plan and lite-execute

Fix:
- Update executionContext definition to show full task object structure
- Add comment clarifying it's an array of structured objects (7 fields each)
- Aligns with actual implementation and lite-execute consumption logic

Impact: Documentation only (no code changes, runtime behavior was already correct)
2025-11-17 20:58:51 +08:00
catlog22
0e21c0dba7 feat(lite-plan): upgrade task structure to detailed objects with implementation guidance
Major changes:
- Add cli-lite-planning-agent.md for generating structured task objects
- Upgrade planObject.tasks from string[] to structured objects with 7 fields:
  - title, file, action, description (what to do)
  - implementation (3-7 steps on how to do it)
  - reference (pattern, files, examples to follow)
  - acceptance (verification criteria)
- Update lite-execute.md to format structured tasks for Agent/Codex execution
- Clean up agent files: remove "how to call me" sections (cli-planning-agent, cli-explore-agent)
- Update lite-plan.md to use cli-lite-planning-agent for Medium/High complexity tasks

Benefits:
- Execution agents receive complete "how to do" guidance instead of vague descriptions
- Each task includes specific file paths, implementation steps, and verification criteria
- Clear separation of concerns: agents only describe what they do, not how they are called
- Architecture validated by Gemini: 100% consistency, no responsibility leakage

Breaking changes: None (backward compatible via task.title || task fallback in lite-execute)
2025-11-17 20:52:49 +08:00
catlog22
8e4e751655 fix(lite-plan): update user confirmation step to collect four inputs instead of three 2025-11-17 18:38:44 +08:00
catlog22
6ebb1801d1 feat(lite-plan): add detailed data structures and enhanced task JSON export for improved planning context 2025-11-17 17:06:13 +08:00
catlog22
0380cbb7b8 feat(lite-execute, lite-plan): store original user input for enhanced task execution context 2025-11-17 16:34:23 +08:00
catlog22
85ef755c12 feat(lite-execute): add new command for executing tasks with in-memory plans and flexible input modes 2025-11-17 16:16:15 +08:00
catlog22
1d766ed4ad fix(lite-plan): clarify executionId definition and tracking flow
Changes:
1. Initialize previousExecutionResults array in Step 5.1
2. Add id field to executionCalls objects (format: [Method-Index])
3. Add execution loop structure in Step 5.2 showing sequential processing
4. Clarify executionId comes from executionCalls[currentIndex].id
5. Add comments explaining ID storage for result collection

Benefits:
- Clear definition of where executionId comes from
- Explicit initialization of tracking variables
- Better understanding of execution flow and result collection
- Proper context continuity across multiple execution calls
2025-11-16 23:14:21 +08:00
catlog22
fe0d30256c feat(lite-plan): enhance execution context continuity for multi-call scenarios
Improvements:
1. Add plan summary in confirmation question for quick review
2. Add previousExecutionResults tracking for multi-execution flows
3. Include execution result collection mechanism after each call
4. Update both Agent and Codex execution prompts with context continuity

Benefits:
- Subsequent executions can see what previous calls completed
- Avoid duplicate work across multiple execution calls
- Better dependency management and task flow
- Clear context propagation: executionId, status, tasks, outputs, notes
2025-11-16 23:10:18 +08:00
catlog22
1c416b538d refactor(lite-plan): separate plan display from user confirmation in Phase 4
Change Phase 4 confirmation flow from single-step to two-step process:
- Step 4.1: Display complete plan as readable text output
- Step 4.2: Collect three-dimensional input via AskUserQuestion

Benefits:
- Clearer plan presentation (not embedded in question)
- Simpler question interface focused on user decisions
- Better user experience with logical separation
2025-11-16 22:56:48 +08:00
catlog22
81362c14de refactor(lite-plan): enhance execution call tracking and user interaction clarity 2025-11-16 21:52:09 +08:00
catlog22
fa6257ecae refactor(lite-plan): streamline planning execution guidelines and enhance user confirmation process 2025-11-16 21:35:47 +08:00
catlog22
ccb4490ed4 refactor(cli-tools): remove redundant model parameters for improved command clarity 2025-11-16 21:11:16 +08:00
catlog22
58206f1996 refactor(lite-plan): update execution method options for clarity and complexity-based selection 2025-11-16 21:03:16 +08:00
catlog22
564bcb72ea refactor(lite-plan): simplify command format for Codex and Qwen by removing redundant parameters 2025-11-16 20:58:25 +08:00
catlog22
a721c50ba3 refactor(lite-plan): enhance three-dimensional confirmation to support multi-select interactions for task approval, execution method, and code review tool 2025-11-15 19:59:38 +08:00
catlog22
2f0ca988f4 refactor(lite-plan): enhance confirmation process with three-dimensional user interaction and optional code review 2025-11-15 18:13:10 +08:00
catlog22
a45f5e9dc2 refactor(lite-plan): enhance task dependency management and introduce parallel execution guidelines 2025-11-15 17:57:11 +08:00
catlog22
b8dc3018d4 refactor(lite-plan): enhance argument hints and clarify exploration flags in documentation 2025-11-15 17:39:28 +08:00
catlog22
763c51cb28 refactor(workflow): remove redundant key characteristics and usage examples from lite-plan documentation 2025-11-15 16:13:08 +08:00
catlog22
a8e8412477 feat(agents): add cli-explore-agent and enhance workflow documentation
Add new cli-explore-agent for code structure analysis and dependency mapping:
- Dual-source strategy (Bash + Gemini CLI) for comprehensive code exploration
- Three analysis modes: quick-scan, deep-scan, dependency-map
- Language-agnostic support (TypeScript, Python, Go, Java, Rust)

Enhance lite-plan workflow documentation:
- Clarify agent call prompts with structured return formats
- Add expected return structures for cli-explore-agent and cli-planning-agent
- Simplify AskUserQuestion usage with clearer examples
- Document data flow between workflow phases

Add code-map-memory command:
- Generate Mermaid code flow diagrams from feature keywords
- Create SKILL packages for code understanding
- Auto-continue workflow with phase skipping

Improve UI design system:
- Add theme colors guide to ui-design-agent
- Enhance code import workflow documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 21:13:42 +08:00
catlog22
158df6acfa feat(workflow): add lite-plan command for intelligent task planning and execution 2025-11-12 20:11:11 +08:00