mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-04 01:40:45 +08:00
- 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.
3.1 KiB
3.1 KiB
Analysis Mode Protocol
Mode Definition
Mode: analysis (READ-ONLY)
Tools: Gemini, Qwen (default mode)
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
- Parse all 6 fields (PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES)
- Read and analyze CONTEXT files thoroughly
- Identify patterns, issues, and dependencies
- Generate insights and recommendations
- Output structured analysis (text response only)
- Validate EXPECTED deliverables met
Core Requirements
ALWAYS:
- Analyze ALL CONTEXT files completely
- Apply RULES (templates + constraints) exactly
- Provide code evidence with
file:linereferences - 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
# 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:linereferences - Specific, actionable recommendations
- No unsubstantiated claims
- EXPECTED deliverables met