Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

Cline-Recursive-Chain-of-Thought-System-CRCT-

> 编程语言
Open source

A framework designed to manage context, dependencies, and tasks in large-scale Cline projects within VS Code

762 stars0 likes1 views
WebsiteGitHub

About

A framework designed to manage context, dependencies, and tasks in large-scale Cline projects within VS Code

Cline Recursive Chain-of-Thought System (CRCT) - v8.4

Welcome to the Cline Recursive Chain-of-Thought System (CRCT), a framework designed to manage context, dependencies, and tasks in large-scale Cline projects within VS Code. Built for the Cline extension, CRCT leverages a recursive, file-based approach with a modular dependency tracking system to maintain project state and efficiency as complexity increases.

  • Version v8.4: OPTIMIZATION & NATIVE VIZ - High-Performance Scaling & Dependency Annotation
    • Optimization: Refactored dependency resolution to $O(M)$ complexity using global set sharing, eliminating redundant path reconstruction.
    • Deterministic LLM Tasking: Implemented monotonically decreasing context-size sorting for LLM resolution tasks to maximize VRAM efficiency and minimize model reloads.
    • Native SVG Renderer (EXPERIMENTAL): Introduced a native Python-based SVG renderer for high-density dependency diagrams with intelligent routing avoidance. Note: Currently experimental; edges may occasionally overlap nodes.
    • Automated Dependency Annotation: New populate_comments.py utility for injecting "Station Headers" and "Connection Maps" directly into source code to enhance agent navigability.
    • Agent Comment-Skill Suite: Deployed a comprehensive suite of plugins and documentation for dependency-driven code comments across multiple languages.
    • Comment-Aware Reporting: Integrated a new comment_index scanner into the reporting pipeline to surface architectural metadata alongside code quality issues.
  • Version v8.3: MODULAR ARCHITECTURE & STABLE CACHING - Architectural Refinement & Reliability
    • Modular Visualization Refactor: The dependency visualization system has been decomposed into a dedicated viz sub-package, separating Mermaid DSL construction, image rendering, and layout configuration.
    • Report Generator Decomposition: Refactored the monolithic report_generator.py into specialized scanner and reporting packages for better maintainability and code quality analysis.
    • Stable Persistent Caching: Implemented SHA256-based stable hashing for cache keys, ensuring cache hits persist across different process runs.
    • Pickle-based Storage: Migrated from JSON to Pickle for more robust Python object serialization in persistent caches, with automatic legacy migration.
  • Version v8.2: LOCAL LLM & DUAL-TOKEN EMBEDDINGS - Automated Resolution & Precise Context
    • Automated Placeholder Resolution: New resolve-placeholders command uses local LLMs (via llama-cpp-python) to verify 'p' dependencies in batches, significantly reducing manual verification time and API costs.
    • Dual-Token Schema: Refactored metadata to track both ses_tokens (for embeddings) and full_tokens (for total file size), enabling smarter context window management.
    • Enhanced Documentation Parsing: Specialized SES extraction for structured docs, improving semantic search for requirements and design specs.
    • Dependency-Aware Cache: Cache invalidation now cascades through logical file dependencies, ensuring analysis consistency.
  • Version v8.1: ⚡ PERFORMANCE & STABILITY - Batching and Caching Overhaul
    • Tracker Batch Collection: New TrackerBatchCollector system for atomic, high-performance tracker writes with rollback support.
    • Advanced Caching: Enhanced @cached decorator with dynamic file dependencies (file_deps), mtime-based invalidation, and automated path tracking.
    • Optimized I/O: Refactored tracker_io with local lookup caching to eliminate redundant file parsing during updates.
    • Report Filtering: report_generator now supports EXCLUSION_PATTERNS to eliminate false positives and groups multiple occurrences for cleaner analysis.
    • Windows Path Consistency: Standardized on Uppercase drive letters for improved compatibility across different Python environments.
  • Version v8.0: MAJOR RELEASE - Embedding & analysis system overhaul
    • Symbol Essence Strings (SES): Revolutionary embedding architecture combining runtime + AST metadata for 10x better accuracy
    • Qwen3 Reranker: AI-powered semantic dependency scoring with automatic model download
    • Hardware-Adaptive Models: Automatically selects between GGUF (Qwen3-4B) and SentenceTransformer based on available resources
    • Runtime Symbol Inspection: Deep metadata extraction from live Python modules (types, inheritance, decorators)
    • PhaseTracker UX: Real-time progress bars with ETA for all long-running operations
    • Enhanced Analysis: Advanced call filtering, deduplication, internal/external detection
    • Breaking Changes: set_char deprecated, exceptions.py removed, new dependencies (llama-cpp-python), requires re-run of analyze-project. See MIGRATION_v7.x_to_v8.0.md
  • Version v7.90: Introduces dependency visualization, overhauls the Strategy phase for iterative roadmap planning, and refines Hierarchical Design Token Architecture (HDTA) templates.
    • Dependency Visualization (visualize-dependencies):
      • Added a new command to generate Mermaid diagrams visualizing project dependencies.
      • Supports project overview, module-focused (internal + interface), and multi-key focused views.
      • Auto-generates overview and module diagrams during analyze-project (configurable).
      • Diagrams saved by default to /dependency_diagrams/.
      • NEW integrated mermaid-cli to render dependency diagrams as .svg files. (experimental stage, subject to change in rendering process)
        • Performs well under 1000 edges to render, struggles with more than 1500 edges. Will reliably time-out with large 4000+ edge diagrams.
        • Requires additional dependency installation, should work via npm install
    • Dependency Analysis and Suggestions
      • Enhanced with python AST (for python)
      • Enhanced with tree-sitter (for .js, .ts, .tsx, .html, .css)
      • More to come!
    • Strategy Phase Overhaul (strategy_plugin.md):
      • Replaced monolithic planning with an iterative, area-based workflow focused on minimal context loading, making it more robust for LLM execution.
      • Clarified primary objective as hierarchical project roadmap construction and maintenance using HDTA.
      • Integrated instructions for leveraging dependency diagrams (auto-generated or on-demand) to aid analysis.
      • Refined state management (.clinerules vs. activeContext.md).
      • Split into Dispatch and Worker prompts to take advantage of new_task
    • HDTA Template Updates:
      • Reworked implementation_plan_template.md for objective/feature focus.
      • Added clarifying instructions to module_template.md and task_template.md.
      • Created new roadmap_summary_template.md for unified cycle plans.
  • Version v7.7: Restructured core prompt/plugins, introduced cleanup_consolidation_plugin.md phase (use with caution due to file operations), added hdta_review_progress and hierarchical_task_checklist templates.
  • Version v7.5: Significant baseline restructuring, establishing core architecture, Contextual Keys (KeyInfo), Hierarchical Dependency Aggregation, enhanced show-dependencies, configurable embedding device, file exclusion patterns, improved caching & batch processing.

System Requirements

Recommended (v8.0+)

  • VRAM: 8GB+ (NVIDIA GPU) for optimal Qwen3-4B model performance
  • RAM: 16GB+ for large projects
  • Disk: 8GB+ for models and embeddings
  • Python: 3.9+
  • Node.js: 16+ (for mermaid-cli visualization)

Minimum

  • RAM: 4GB (CPU-only mode with reduced batch sizes)
  • Disk: 500MB+ (lightweight models)
  • Python: 3.9+

The system automatically adapts to available hardware.


Key Features

  • Recursive Decomposition: Breaks tasks into manageable subtasks, organized via directories and files for isolated context management.
  • Minimal Context Loading: Loads only essential data, expanding via dependency trackers as needed.
  • Persistent State: Uses the VS Code file system to store context, instructions, outputs, and dependencies. State integrity is rigorously maintained via a Mandatory Update Protocol (MUP) applied after actions and periodically during operation.
  • Modular Dependency System: Fully modularized dependency tracking system.
  • Contextual Keys: Introduces KeyInfo for context-rich keys, enabling more accurate and hierarchical dependency tracking.
  • Hierarchical Dependency Aggregation: Implements hierarchical rollup and foreign dependency aggregation for the main tracker, providing a more comprehensive view of project dependencies.
  • Enhanced Dependency Workflow: A refined workflow simplifies dependency management.
    • show-keys identifies keys needing attention ('p', 's', 'S') within a specific tracker.
    • show-dependencies aggregates dependency details (inbound/outbound, paths) from all trackers for a specific key, eliminating manual tracker deciphering.
    • add-dependency resolves placeholder ('p') or suggested ('s', 'S') relationships identified via this process. Crucially, when targeting a mini-tracker (*_module.md), add-dependency now allows specifying a --target-key that doesn't exist locally, provided the target key is valid globally (known from analyze-project). The system automatically adds the foreign key definition and updates the grid, enabling manual linking to external dependencies.
      • Tip: This is especially useful for manually linking relevant documentation files (e.g., requirements, design specs, API descriptions) to code files within a mini-tracker, even if the code file is incomplete or doesn't trigger an automatic suggestion. This provides the LLM with crucial context during code generation or modification tasks, guiding it towards the intended functionality described in the documentation (doc_key --target-key
    • Dependency Visualization (visualize-dependencies): (NEW in v7.8)
    • Generates Mermaid diagrams for project overview, module scope (internal + interface), or specific key focus.
    • Auto-generates overview/module diagrams via analyze-project.
    • NEW in v7.90 Now generates .svg image files for diagram visualization if the mermaid-cli dependency is installed.
  • Iterative Strategy Phase: (NEW in v7.8)
    • Plans the project roadmap iteratively, focusing on one area (module/feature) at a time.
    • Explicitly integrates dependency analysis (textual + visual) into planning.
  • Refined HDTA Templates: (NEW in v7.8)
    • Improved templates for Implementation Plans, Modules, and Tasks.
    • New template for Roadmap Summaries.
  • Configurable Embedding Device: Allows users to configure the embedding device (cpu, cuda, mps) via .clinerules.config.json for optimized performance on different hardware. (Note: the system does not yet install the requirements for cuda or mps automatically, please install the requirements manually or with the help of the LLM.)
  • File Exclusion Patterns: Users can now define file exclusion patterns in .clinerules.config.json to customize project analysis.
  • Automated Dependency Annotation: (NEW in v8.4)
    • Automatically injects Station Headers (ROLE, LAYER, CRCT_KEY) at the top of source files.
    • Adds Connection Maps (dependency rails) before function and class definitions.
    • Preserves agent-authored prose in [FILL: ...] tags while refreshing architectural metadata.
  • Experimental Native SVG Visualization: (NEW in v8.4)
    • A Python-native renderer for high-density dependency graphs.
    • Bypasses mermaid-cli overhead for local visualizations.
    • Suppor

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言