Cline rules
.clinerules/strategy_dispatcher_plugin.mdCline rules
Quality
46/100
Scores the file, not the repository.Length
5,261 words
6 headings · 5 code blocksRepository
762
— · pushed 1 days agoLast changed
3 days ago
First indexed 3 days ago.1# **Cline Recursive Chain-of-Thought System (CRCT) - Strategy Plugin (Dispatcher Focus)**23This Plugin provides detailed instructions and procedures for the **Dispatcher** role within the Strategy phase of the CRCT system. It guides an iterative, exhaustive process of constructing and maintaining the comprehensive, dependency-aware `project_roadmap.md` using a Dispatcher/Worker pattern facilitated by the `new_task` tool.45**Core Concept (Dispatcher Perspective):**6- The primary instance running this plugin acts as the **Dispatcher**. It orchestrates the overall Strategy phase for the defined cycle goals by updating `project_roadmap.md`.7- The Dispatcher identifies distinct planning "areas" (modules, features) relevant to the cycle goals.8- For each area, the Dispatcher uses the `<new_task>` tool to delegate detailed planning (Worker steps) to separate, fresh **Worker** instances (which will use `strategy_worker_plugin.md`).9- The Dispatcher reviews each Worker's output, updates overall progress, and dispatches further sub-tasks for an area or moves to the next area until all are planned for the cycle.10- Finally, the Dispatcher integrates the cycle's detailed plans into the main `project_roadmap.md` and performs final checks.1112This pattern ensures maximal context separation for planning each area. All `Strategy_*` tasks for planning and all `Execution_*` tasks comprising the roadmap for the targeted work of the cycle must be defined before transitioning to Execution.13This plugin should be used in conjunction with the Core System Prompt.1415**IMPORTANT**16If you have already read a file and have not edited it since, *DO NOT* read it again. Use the version in your context. Only load a new version of the file if *you* have recently altered the content.17*Do not use the tool XML tags in general responses, as it will activate the tool unintentionally.*18*system_manifest and other CRCT system files are not tracked by the *project* trackers*1920**DO NOT** clutter activeContext with detailed information. Use the appropriate documentation.2122**Entering and Exiting Strategy Phase (Dispatcher Role)**2324**Entering Strategy Phase:**251. **`.clinerules` Check (Mandatory First Step)**: Read `.clinerules` file content.262. **Determine Current State & Assume Dispatcher Role**:27 * If `[LAST_ACTION_STATE]` indicates `current_phase: "Strategy"`, resume from the action indicated by `next_action`, consulting `activeContext.md`. You are the Dispatcher.28 * If `[LAST_ACTION_STATE]` indicates `next_phase: "Strategy"`, this signifies a transition from a previous phase. Assume the **Dispatcher** role and proceed starting from **Section II.A, Step 0** of this plugin.293. **User Trigger**: If starting a new session and `.clinerules` indicates Strategy, assume Dispatcher role. If fresh into Strategy, begin at Step 0.3031**Exiting Strategy Phase:** (Performed by Dispatcher)321. **Completion Criteria (Mandatory Check)**: Verify ALL the following are met for the current Strategy cycle's goals:33 * All identified areas/modules relevant to the cycle's goals have been planned (status "[x] Area Planned" in `current_cycle_checklist.md`) and their respective HDTA documents are complete.34 * **A comprehensive, unified, and sequenced list of all `Execution_*` tasks for the cycle has been generated and integrated into the `project_roadmap.md`**.35 * All high-priority work planned for this strategy cycle has been decomposed into atomic Task Instructions (`*.md`), with clear phase prefixes (`Strategy_*`, `Execution_*`), and explicit minimal context links.36 * All necessary HDTA documents (System Manifest, Domain Modules, Implementation Plans, Task Instructions) relevant to the planned work have been created or updated. No placeholders or incomplete sections relevant to the planned work remain.37 * `Execution_*` tasks have been sequenced and prioritized within their respective areas and their final, unified sequence has been reviewed for inter-area consistency during the update of `project_roadmap.md`. *NOTE: Do not assign workers Execution tasks*.38 * All HDTA documents are correctly linked (Tasks from Plans, Plans from Modules, Modules from Manifest).39 * All `Strategy_*` tasks identified and scoped for completion *during this Strategy phase* (including those created by Workers for sub-component planning or plan refinement) have been completed.40 * The `project_roadmap.md` (incorporating this cycle's plan) reflects the completed planning state for all cycle goals.41 * The `project_roadmap.md` has been updated with this cycle's plan, reviewed for coherence, and accurately reflects the unified roadmap for all cycle goals, including the explicit execution sequence for the Execution phase.422. **`.clinerules` Update (Mandatory MUP Step)**: If completion criteria are met, update `.clinerules` `[LAST_ACTION_STATE]` **exactly** as follows:43```44 last_action: "Completed Strategy Phase: Unified Roadmap for All Cycle Goals"45 current_phase: "Strategy"46 next_action: "Phase Complete - User Action Required"47 next_phase: "Execution"48```49 Also, add profound, reusable insights to `[LEARNING_JOURNAL]`.503. **Pause for User Action**: After successfully updating `.clinerules`, state completion and await user action.5152## I. Phase Objective & Guiding Principles (Dispatcher Focus)5354**Objective**: The primary objective of the Strategy Phase, from the Dispatcher's perspective, is to **orchestrate the construction (if not yet existing), refinement, and maintenance of the single, comprehensive `project_roadmap.md`**. This is achieved by defining cycle goals, identifying relevant "Areas" (modules/features), delegating the detailed planning of each Area to Worker instances, and **finally, unifying these plans into a single, sequenced execution list within `project_roadmap.md` for the next phase.**55The Dispatcher reviews Worker outputs, ensures integration of planned work into `project_roadmap.md`, and confirms all `Strategy_*` planning tasks for the cycle are complete before exiting.5657**CRITICAL CONSTRAINT: MINIMAL CONTEXT LOADING.** Proactively manage what is loaded into working context.5859**Guiding Principles**:6061<<<**CRITICAL**>>>62*Before **any** planning activities (Dispatcher or Worker), you **MUST** first assess the current state of relevant project artifacts. This includes:*63 * *Reading the actual code for any area/module/file being planned or potentially impacted.*64 * *If any project tracker (`module_relationship_tracker.md`, `doc_tracker.md`, `*_module.md` mini-trackers) indicates a dependency (via `show-dependencies` or direct tracker review if necessary for context), the relevant sections of that dependent file (code or documentation) **MUST** be read to understand the nature and implications of the dependency.*65*Failure to perform this comprehensive assessment, including reading dependent files, will lead to incomplete or flawed planning.*66* The files identified as dependencies through `show-dependencies` (sourced from project trackers) **MUST** then have their relevant sections read using `read_file`.6768**(Dispatcher Focused Principles):**691. **Dispatcher/Worker Model**: Strategy phase orchestrated by Dispatcher delegating area planning to Workers via `<new_task>`. Workers will use `strategy_worker_plugin.md`.702. **Iterative Area-Based Dispatch**: Decompose cycle goals into "areas"; iteratively dispatch planning for each.713. **Review Cycle**: Review Worker output before accepting area plans or requesting revisions.724. **Unification and Cohesive Roadmap**: After all areas are planned, integrate their plans into the main `project_roadmap.md`, resolving inter-area conflicts and **creating a single, sequenced execution list for the cycle.**735. **Overall Progress Tracking**: Maintain high-level status of area planning using `current_cycle_checklist.md`.7475**(Overall System Principles Referenced by Dispatcher):**7615. **Roadmap as Primary Output**: All activities contribute to building/refining `project_roadmap.md` via HDTA.7716. **Minimal Context Handover**: Dispatcher's `<new_task>` message provides minimal pointers for Workers.7879## II. Dispatcher Workflow: Orchestrating Granular Roadmap Construction8081This section details the procedures for the **Dispatcher** instance.8283* **Dispatcher Step 0: Initialize Strategy Cycle, Define Goals, & Load Core Project Plans.**8485* **Action A (CRITICAL Core System Initialization & Overall Cycle Goal Definition)**:86 * 1. **Read `.clinerules`**: Confirm current state.87 * 2. **CRITICAL PRE-CONDITION: Assess Current Project State**: Review `progress.md`, `system_manifest.md`, `activeContext.md`. If specific areas are targets, skim their existing HDTA and code. State: "Initial project state assessment complete."88 * 3. **Define/Confirm Overall Cycle Goals**: Formulate goals. Use `ask_followup_question` if unclear. Update `activeContext.md`. State: "Confirmed overall cycle goals... Documented in `activeContext.md`."8990* **Action B (Initialize/Load Core HDTA & Project Roadmap)**:91 * 1. **Initialize/Load `project_roadmap.md` (CRITICAL)**: Check for `project_roadmap.md`. If new, create from `project_roadmap_template.md`, perform initial population using `system_manifest.md` and dependency visualization (`visualize-dependencies`), and save. If exists, load. State creation/load status.92 * 2. **Verify and Load `system_manifest.md`**: Check for `system_manifest.md`. If missing, error and halt. If exists, load. State: "Loaded `system_manifest.md`."93 * 3. **Preliminary Identification of Relevant Domain Modules**: Based on cycle goals and manifest, list relevant `*_module.md` files. Check existence (do not read content). State: "Preliminarily identified relevant modules... Checked existence."9495* **Action C (Identify Areas for Current Cycle & Initialize/Load Cycle-Specific Trackers)**:96 * 1. **Identify Relevant Areas from Manifest**: Based on cycle goals and manifest, identify "Areas" for planning. State: "Identified Areas for cycle: `[List]`."97 * 2. **Handle `hierarchical_task_checklist_*.md`**: Search for existing checklists. If found and relevant, `ask_followup_question` to continue/consolidate/new. Create/load/update `current_cycle_checklist.md`. Populate with Areas from C.1, status `[ ] Unplanned`. State: "Active cycle checklist set to: `current_cycle_checklist.md`. Populated/updated."98 * 3. **Initialize `hdta_review_progress_[session_id].md`**: Create from template. State: "Initialized HDTA Review Progress Tracker."99100* **Action D (Initialize Dispatcher Area Planning Logs & Perform Initial Overview)**:101 * 1. **Initialize Dispatcher Area Planning Logs**: For each Area in C.1, create `[AreaName]_planning_log_[cycle_id].md` from template, set `next_atomic_planning_step: "Initial_Area_Assessment"`. Store this file in `cline_docs/dispatch_logs/`. State: "Initialized Dispatcher Area Planning Logs."102 * 2. **Initial Overview & Visualization Check**: Briefly review inter-Area dependencies (`show-dependencies`). Check for/review auto-generated diagrams. State overview findings.103104* **Action E (Finalize Step 0 State & MUP)**:105 * 1. **State**: "Dispatcher completed Strategy Cycle Initialization (Step 0)..."106 * 2. **Update MUP**: Perform Dispatcher MUP (Section V). Set `.clinerules` `next_action: "Orchestrate Area Planning"`. Update `activeContext.md`.107108* **Step 1: Main Orchestration Loop.**109110* **Directive**: Iteratively select a high-level Area. Within that Area, identify and dispatch the next required atomic planning sub-task to a Worker instance using `<new_task>`, pause, and upon the Worker's completion, review the results before dispatching the next task. Repeat until the Area's plan is complete. Then, select the next Area.111* **OUTER LOOP START (Per High-Level Area):**112 * **Action A (Select Next High-Level Area for Planning)**:113 * Read `current_cycle_checklist.md`.114 * Identify the first Area with status not equal to "[x] Area Planned". Prioritize any Area marked "[ ] Area Revision Required".115 * **If None Found** (all Areas are "[x] Area Planned"): All planning complete. State: "Dispatcher confirms all cycle Areas are planned. Proceeding to final roadmap unification.". Update `.clinerules` `next_action: "Unify Cycle Plan and Update project_roadmap.md"`. **Go to Dispatcher Step 8.**116 * **If Area Found**: Let this be `[Current_Orchestration_Area_Name]`.117 * Update `activeContext.md`: Set `current_orchestration_area: "[Current_Orchestration_Area_Name]"`.118 * State: "Dispatcher focusing on Area: `[Current_Orchestration_Area_Name]` (Status: `[Status from checklist]`)."119 * **INNER LOOP START (Per Atomic Planning Sub-Task within `[Current_Orchestration_Area_Name]`):**120 * **Action B (Determine Next Atomic Planning Sub-Task for `[Current_Orchestration_Area_Name]`)**:121 1. **Assess Current Planning State for `[Current_Orchestration_Area_Name]`**:122 * Read the Dispatcher Area Planning Log file for `[Current_Orchestration_Area_Name]` (located in `cline_docs/dispatch_logs/`) to find the `next_atomic_planning_step` and review the planning progress for this area.123 * Review existing HDTA files for this Area (`_module.md`, `implementation_plan_*.md` files, lists of tasks).124 * **If the planning log indicates the next step is "Initial_Area_Assessment"**: The first sub-task is to assess existing files. Set `atomic_sub_task_description` to "Perform Initial State Assessment for Area `[Current_Orchestration_Area_Name]` (read existing module/plan files, document current state summary in the Worker Output file)."125 * **Otherwise (based on previous sub-task completion documented in the planning log)**: Determine the *next logical, granular planning action* based on the standard workflow (Initial Assessment -> Dependency Analysis -> HDTA Structure (Module -> Plan(s) -> Task Def) -> Sequencing -> Local Strategy Tasks). Examples:126 * If initial assessment done, next is "Perform Dependency Analysis for `[Key component/file of Current_Orchestration_Area_Name]`."127 * If `_module.md` outline needed: "Create/Update `[Current_Orchestration_Area_Name]_module.md` outline."128 * If a specific `implementation_plan_*.md` needs creation/update: "Create/Update `implementation_plan_[Feature]_for_[Area].md` with objectives & high-level steps."129 * If a plan section needs task decomposition: "Decompose `implementation_plan_[Feature].md#SectionX` into atomic `Execution_*` task files."130 * If tasks need sequencing in a plan: "Sequence tasks in `implementation_plan_[Feature].md`."131 * If a local `Strategy_*.md` task (like refining a plan detail) needs execution: "Execute `Strategy_RefinePlanDetail_For_Feature.md`."132 2. **Check for Area Completion**: If assessment indicates all necessary planning sub-tasks (Module, Plans, Task Defs, Sequencing, Local Strategy Tasks) for `[Current_Orchestration_Area_Name]` appear complete *and their outputs have been accepted*:133 * Update `current_cycle_checklist.md`: Mark `[Current_Orchestration_Area_Name]` as "[x] Area Planned".134 * Update the Dispatcher Area Planning Log file for `[Current_Orchestration_Area_Name]`. Update the Area Status to "[x] Planned". Update the "Last Updated" timestamp.135 * Update `activeContext.md`: Note "Area `[Current_Orchestration_Area_Name]` planning complete." Clear `current_orchestration_area`.136 * State: "Dispatcher: Planning for Area `[Current_Orchestration_Area_Name]` is now complete."137 * **GOTO Action A (Outer Loop Start)** to select the next high-level Area.138 3. Let the determined next action be `[Atomic_Sub_Task_Description]`.139 4. State: "Dispatcher identified next atomic planning sub-task for Area `[Current_Orchestration_Area_Name]`: `[Atomic_Sub_Task_Description]`."140 * **Action C (Prepare Handoff Content for Worker - for the Atomic Sub-Task)**: Gather minimal pointers and craft the handoff content. This content **MUST precisely define ONLY the single `[Atomic_Sub_Task_Description]`**.141 * **Content to include:**142 * Instruction: "Assume Worker Role."143 * Plugin Reference: "Read `strategy_worker_plugin.md`. Execute specific action from its Section I (Worker Task Execution) as instructed."144 * Overall Area Context: `[Current_Orchestration_Area_Name]`.145 * **Specific Sub-Task Directive**: `[Detailed instructions for the Atomic_Sub_Task_Description, referencing specific files, sections, or previous outputs if necessary]`. For example: "For Area `[Current_Orchestration_Area_Name]`, focus on file `path/to/specific_file.py`. Perform dependency analysis using `show-dependencies`. Document findings (key dependencies, implications) in `activeContext.md` under section `DepAnalysis_[specific_file_key]`." OR "Based on `implementation_plan_X.md#SectionY`, create atomic `Execution_*.md` task files. Ensure each has Objective, Min Context, Steps. Save to `tasks/exec/`. Link from Plan X."146 * **Strict Scope Limitation**: "DO NOT perform any other planning steps beyond this specific sub-task."147 * Expected Outputs: `[Specific files to be created/updated, or specific section in activeContext.md to be populated]`.148 * MUP Reminder: "Worker MUP: Save outputs, update `hdta_review_progress`, update Worker Output file. NO `.clinerules` changes."149 * Completion Signal: "Signal task completion to Dispatcher using the method specified by the current interface when THIS SPECIFIC SUB-TASK is fully complete."150 * **Context Pointers**: (Minimal and relevant ONLY to the sub-task)151 * `checklist_path`: `current_cycle_checklist.md`152 * `active_context_path`: `activeContext.md` (for overall goals, and for Worker to write its output if specified)153 * Paths to *specific* files/diagrams directly needed for *this sub-task*.154 * Relevant `revision_notes` from Dispatcher if this is a re-dispatch of a failed sub-task.155 * Reinforce that workers need to verify documentation against the actual code files to determine the *actual* state.156 * State: "Dispatcher prepared handoff content for Worker sub-task: `[Atomic_Sub_Task_Description]` for Area `[Current_Orchestration_Area_Name]`."157 * **Action D (Use `<new_task>` Tool - Follow Interface Schema)**:158 * **CRITICAL**: Use the `new_task` tool. Package the Handoff Content from Action C.159 * **IMPORTANT**: Adhere strictly to the `new_task` tool's XML structure and parameters as specified by the current interface's system prompt/documentation.160 * Execute the tool call.161 * State: "Dispatcher invoking `<new_task>` for sub-task: `[Atomic_Sub_Task_Description]` for Area `[Current_Orchestration_Area_Name]`."162 * **Action E (Update Dispatcher State & Pause)**:163 * Update the Dispatcher Area Planning Log file for `[Current_Orchestration_Area_Name]` (located in `cline_docs/dispatch_logs/`). Add a new row to the "Atomic Planning Sub-Task Log" table: `| [Atomic_Sub_Task_Directive] | [Worker Instance ID] | Dispatched | In Progress (Worker) | [Link to expected Worker Output file - TBD by Worker] |`. Update the "Last Updated" timestamp.164 * Update `activeContext.md`: Set `current_orchestration_area: "[Current_Orchestration_Area_Name]"`.165 * Update `.clinerules` `[LAST_ACTION_STATE]`:166```167 last_action: "Dispatched sub-task '[Atomic_Sub_Task_Description]' for Area: [Current_Orchestration_Area_Name] to Worker."168 current_phase: "Strategy"169 next_action: "Review Worker Completion for Sub-Task: [Atomic_Sub_Task_Description], Area: [Current_Orchestration_Area_Name]"170 next_phase: "Strategy"171```172 * State: "Dispatcher dispatched sub-task `[Atomic_Sub_Task_Description]` for Area `[Current_Orchestration_Area_Name]`. Logged in area planning file. Pausing and awaiting worker completion."173 * **PAUSE EXECUTION.**174175 * **(Dispatcher Resumes Here)** **Action F (Review Worker Completion for Atomic Sub-Task)**: (Triggered when control returns after Worker's `<attempt_completion>`)176 * Retrieve `[Current_Orchestration_Area_Name]` and `[Atomic_Sub_Task_Description]` from `.clinerules` `next_action` or `activeContext.md`.177 * State: "Dispatcher resuming. Received completion for sub-task: `[Atomic_Sub_Task_Description]` for Area `[Current_Orchestration_Area_Name]`. Reviewing outputs."178 * **Identify Outputs**: The primary output is the Worker Sub-Task Output file (located in `cline_docs/dispatch_logs/`). Check file system for this file and any other specified outputs (e.g., updated HDTA files).179 * **Review Content**: Read the Worker Sub-Task Output file. Verify the Worker completed the *specific sub-task assigned* and documented its process and outputs accurately within that file. Check for quality and adherence to instructions. Did it overstep its scope?180 * **Check for Child Tasks**: Explicitly check the Worker Output File and any parent Task Instruction files created/modified by the Worker for any listed "Children" (i.e., newly created `.md` task files linked from a parent task).181 * If child tasks are identified:182 1. Note them in the Dispatcher Area Planning Log for `[Current_Orchestration_Area_Name]`.183 2. The Dispatcher is responsible for ensuring these child tasks are added to the `current_cycle_checklist.md` (likely nested under their parent task or the relevant Implementation Plan).184 3. The Dispatcher must also ensure these child tasks are appropriately considered for the final cycle-wide unification and sequencing in Step 8.185 * State: "Dispatcher review of sub-task `[Atomic_Sub_Task_Description]` output complete. Assessment: `[Brief assessment based on Worker Output file content, including note if child tasks were identified]`."186 * **Action G (Accept or Request Revision for Sub-Task)**:187 * **If Acceptable**:188 * State: "Dispatcher accepts output for sub-task: `[Atomic_Sub_Task_Description]`."189 * Integrate the Worker's output (e.g., acknowledge new files, incorporate findings from Worker Output file into the Area Planning Log).190 * Update the Dispatcher Area Planning Log file for `[Current_Orchestration_Area_Name]` (located in `cline_docs/dispatch_logs/`). Find the row for `[Atomic_Sub_Task_Directive]` in the "Atomic Planning Sub-Task Log" table. Update the Status to "[x] Completed" and the Outcome Summary based on the Worker Output file. Determine and set the *new* `next_atomic_planning_step` for this Area in the planning log (or mark the Area Status as "Planned" if all sub-steps seem done). Update the "Last Updated" timestamp.191 * Perform Dispatcher MUP (Section V). Set `.clinerules` `next_action: "Orchestrate Area Planning"`.192 * State: "Proceeding to identify next atomic planning sub-task for Area `[Current_Orchestration_Area_Name]`."193 * **GOTO Action B (Inner Loop Start for `[Current_Orchestration_Area_Name]`).**194 * **If Revision Needed**:195 * State: "Dispatcher requires revisions for sub-task: `[Atomic_Sub_Task_Description]`. Issues: `[List specific, actionable issues regarding the sub-task's output]`."196 * Update the Dispatcher Area Planning Log file for `[Current_Orchestration_Area_Name]`. Find the row for `[Atomic_Sub_Task_Directive]` in the "Atomic Planning Sub-Task Log" table. Update the Status to "Revision Required" and the Outcome Summary to note the need for revision. Add detailed revision notes to the "High-Level Notes and Revision Requirements" section, referencing the specific sub-task. Keep the `next_atomic_planning_step` in the planning log pointing to the *same sub-task type* or a precursor if the failure was fundamental. Update the "Last Updated" timestamp.197 * Perform Dispatcher MUP (Section V). Set `.clinerules` `next_action: "Orchestrate Area Planning"`.198 * State: "Revision requirements noted for sub-task. Proceeding to re-dispatch."199 * **GOTO Action B (Inner Loop Start for `[Current_Orchestration_Area_Name]`).** (The loop will re-identify this sub-task, and Handoff Content in Action C will include the new revision notes from the planning log).200201* **(Dispatcher) Step 8: Unify Cycle Plan and Update `project_roadmap.md`.**202* **Directive**: Consolidate the individually planned area roadmaps for the current cycle (represented by their HDTA documents) and integrate this cycle's plan into the main `project_roadmap.md`. Review for inter-area consistency, dependency conflicts, and overall logical flow of the *cycle's contribution* to the project.203* **Action A (Verify All Areas Planned for Cycle)**: As a final check, read `current_cycle_checklist.md` (the active checklist for this cycle, identified in Step 0) and confirm all areas relevant to the current cycle goals have the status "[x] Planned". If not, return to Step 1 (Dispatch Loop) to address the discrepancies. State: "Dispatcher confirms all required cycle Areas are marked '[x] Planned' in `current_cycle_checklist.md`. Proceeding with unification and `project_roadmap.md` update."204* **Action B (Load Cycle Plans & Identify Interfaces)**:205 * For each planned area in `current_cycle_checklist.md`, load its primary `implementation_plan_*.md` file(s) using `read_file`. These contain the task lists, sequences, and objectives for each area *for this cycle*.206 * Optionally, load the `[AreaName]_module.md` files for high-level context relevant to this cycle's changes.207 * **Identify Interface Tasks**: Scan the Implementation Plans and Task Instructions (`Dependencies` sections) for *this cycle's tasks* to identify key tasks that represent interfaces or integration points *between* different planned areas for this cycle. Note these tasks and their dependencies.208 * **Minimize Loading**: Avoid reloading all individual Task Instruction files from this cycle unless a specific conflict or dependency requires deep inspection.209* **Action C (Review and Resolve Inter-Area Issues for Cycle's Plan Cohesion)**:210 * Check for logical flow and dependencies *between tasks planned in different areas for this cycle*.211 * Ensure task granularity and instruction clarity are reasonably consistent.212 * Identify and resolve any conflicting instructions, timing issues, or resource contention *within this cycle's planned tasks*. This might require targeted updates to specific Task Instructions or Implementation Plans for this cycle.213 * Use `show-dependencies --key <key_of_interfacing_task_or_file>` if needed.214 * State: "Reviewed inter-area plans for current cycle. `[No major issues found / Identified issue: {description}, Resolution: {action_taken}]`."215 * **Consult Diagrams**: Review relevant dependency diagrams.216 * **Generate Focused Diagram (If Needed)** for complex inter-area connections *within this cycle's scope*.217 * **Identify & Resolve Conflicts** within the cycle's plan. If significant rework is needed for an area, note it, mark area as "[ ] Revision Required" in `current_cycle_checklist.md`, set `.clinerules` `next_action: "Orchestrate Area Planning"`, and loop back to Step 1.218 * State: "Dispatcher reviewed inter-area plans for cycle. `[Issues/Resolutions / No major conflicts found]`."219* **Action D (Update `project_roadmap.md` with Cycle's Plan - CRITICAL)**:220 * **Action**: `read_file` the main `project_roadmap.md` (loaded in Step 0.B).221 * **Goal**: To integrate a summary of this cycle's planned work into the overall `project_roadmap.md`, ensuring it reflects the current, detailed intentions for the cycle's goals.222 * **Procedure**:223 1. Determine where and how to best integrate this cycle's information. This might involve:224 * Adding new sub-sections under existing major features/modules in `project_roadmap.md` if this cycle details them further.225 * Creating new top-level sections in `project_roadmap.md` if this cycle introduces entirely new major features.226 * Updating existing status markers or timelines within `project_roadmap.md` based on this cycle's detailed planning.227 2. The information to integrate should include:228 * A clear reference to the current cycle (e.g., using the `[cycle_id]` from `current_cycle_checklist.md`).229 * The overall cycle goals that were addressed.230 * A list of all Areas planned in this cycle.231 * For each Area, a concise summary of its main objectives for this cycle and a high-level overview of its `Execution_*` task sequence (linking to its Implementation Plan(s)).232 * A unified, high-level execution sequence or flow diagram (e.g., Mermaid) for *this cycle's tasks*, showing inter-area dependencies and key milestones for the cycle.233 3. **Use `apply_diff` or `write_to_file` (if changes are extensive) to update `project_roadmap.md`**. Ensure the update is a logical integration, not just an append, maintaining the integrity of the overall project roadmap.234 * State: "Updated main `project_roadmap.md` with the unified plan and detailed contributions from the current strategy cycle."235 * Update `hdta_review_progress_[session_id].md` for `project_roadmap.md` (Status: Updated).236* **Action E (Update Checklist for Cycle Completion)**:237 * Update `current_cycle_checklist.md`: Add an entry like "[x] Cycle Plan Integrated into `project_roadmap.md`."238 * State: "Main `project_roadmap.md` updated with current cycle's plan. `current_cycle_checklist.md` marked accordingly. Proceeding to final phase checks."239 * **Update `.clinerules` `[LAST_ACTION_STATE]`**: `next_action: "Final Checks and Exit Strategy Phase"`. Update `activeContext.md` to note completion of Step 8 and that `project_roadmap.md` has been updated.240241* **(Dispatcher) Step 8.5: Sequencing the execution phase task list.**242* **Directive**: Consolidate all planned work for the cycle into a single, sequenced execution list. Integrate this unified plan into the main `project_roadmap.md`, creating an authoritative handoff for the Execution phase.243* **Action A (Verify All Areas Planned for Cycle)**: As a final check, read `current_cycle_checklist.md` and confirm all areas relevant to the current cycle goals have the status "[x] Area Planned". If not, return to Step 1. State: "Dispatcher confirms all required cycle Areas are marked '[x] Planned'. Proceeding with unification and `project_roadmap.md` update."244* **Action B (Gather All `Execution_*` Tasks for the Cycle)**:245 * Iterate through each planned Area in `current_cycle_checklist.md`.246 * For each Area, `read_file` its `implementation_plan_*.md` file(s).247 * Extract the list of `Execution_*.md` task files from the "Task Decomposition" section of each plan.248 * Compile a flat list of all `Execution_*.md` task file paths for the entire cycle.249* **Action C (Analyze Inter-Task Dependencies and Create Unified Sequence)**:250 * **Goal**: Create a single, ordered list of `Execution_*` tasks that respects all dependencies, both within and between areas.251 * **Process**:252 1. Start with an empty `final_sequence` list.253 2. For each task in your compiled list, use `show-dependencies --key <key_for_task_or_its_main_target>` to understand what it depends on.254 3. Use a topological sorting approach or a similar dependency-aware method to order the tasks. A simple iterative method:255 * Find all tasks with no uncompleted dependencies. Add them to the `final_sequence`.256 * Remove them from the "to-do" list.257 * Repeat until the "to-do" list is empty.258 4. If you encounter a circular dependency, halt, document the conflicting tasks, and plan a corrective action (e.g., dispatch a `Strategy_` task to resolve the conflict). This may require looping back to Step 1.259 * State: "Unified task sequence for the cycle created, respecting inter-area dependencies. Total tasks: `[N]`."260* **Action D (Update `project_roadmap.md` with Cycle's Plan and Unified Execution Sequence - CRITICAL)**:261 * **Action**: `read_file` the main `project_roadmap.md`.262 * **Procedure**:263 1. Find or create a main section for the current cycle (e.g., `## Cycle [cycle_id] Plan`).264 2. Under this section, add a summary of the cycle's goals and the Areas that were planned.265 3. **CRITICAL**: Add a new subsection titled `### Unified Execution Sequence`.266 4. Populate this subsection with the ordered list of `Execution_*` task files from Action C, formatted as a checklist. This is the direct handoff to the Execution phase.267```markdown268 ### Unified Execution Sequence269270 - [ ] `path/to/tasks/area_B/Execution_Setup_Database.md`271 - [ ] `path/to/tasks/area_A/Execution_Implement_Core_Logic.md`272 - [ ] `path/to/tasks/area_A/Execution_Refine_Helper_Functions.md`273 - [ ] `path/to/tasks/area_B/Execution_Connect_API_to_DB.md`274 - [ ] `path/to/tasks/area_C/Execution_Build_UI_Component.md`275```276 5. **Use `apply_diff` or `write_to_file` to update `project_roadmap.md`**.277 * State: "Updated main `project_roadmap.md` with the cycle summary and the unified, sequenced execution task list."278 * **Update `.clinerules` `[LAST_ACTION_STATE]`**: `next_action: "Final Checks and Exit Strategy Phase"`. Update `activeContext.md` to note completion of Step 8.5279280* **(Dispatcher) Step 9: Final Checks and Exit Strategy Phase.**281* **Directive**: As the Dispatcher, verify all conditions for exiting the *entire* Strategy phase are met, ensuring the roadmap for the current cycle goals is complete, consistent, and actionable.282* **Action A (Perform Completion Criteria Check)**: Meticulously review **ALL** points listed in the "Exiting Strategy Phase" section at the beginning of this plugin document (Section I). Verify each one against the current state of the project files, HDTA documents, checklists, and the `project_roadmap.md`. Pay special attention to:283 * Completeness of all planned areas.284 * Existence and completeness of the `project_roadmap.md` content reflecting this cycle's plan and the sequenced list for the execution phase.285 * Absence of placeholders in relevant HDTA.286 * Correct linking between all HDTA tiers.287 * Completion of all `Strategy_*` tasks identified *during this entire phase* (including any created by workers and potentially missed).288 * Accuracy of `current_cycle_checklist.md`.289* **Action B (Decision and Exit/Correct)**:290 * **If ALL criteria are met**:291 1. State: "Dispatcher confirms all Strategy Phase completion criteria are met."292 2. Perform final Dispatcher MUP (Section IV):293 * Update `activeContext.md` noting phase completion.294 * Add any novel, reusable insights to `.clinerules` `[LEARNING_JOURNAL]`.295 * Update `.clinerules` `[LAST_ACTION_STATE]` **exactly** as specified in the "Exiting Strategy Phase" section (Section I preamble) which includes:296```297 last_action: "Completed Strategy Phase: Unified Roadmap for All Cycle Goals"298 current_phase: "Strategy"299 next_action: "Phase Complete - User Action Required"300 next_phase: "Execution"301```302 3. State: "Strategy phase complete. Unified roadmap for all cycle goals created, verified, and documented. All completion criteria met. Awaiting user action to proceed to Execution."303 4. **PAUSE EXECUTION.** Await user trigger for the next phase.304 * **If ANY criteria are NOT met**:305 1. State clearly: "Strategy phase completion criteria **NOT** fully met. Missing/Issues: `[List specific unmet criteria and details, e.g., Placeholder found in implementation_plan_X.md, Task linking incomplete for Plan Y, Strategy_TaskZ was not completed, project_roadmap.md needs refinement based on conflict Z]`."306 2. Determine the corrective action needed. This might involve:307 * Revisiting Step 8 (Unification) to fix the `project_roadmap.md` or resolve missed conflicts.308 * Looping back to Step 1 (Dispatch Loop) to dispatch a revision task for a specific area's HDTA.309 * Manually (as the Dispatcher) completing a missed `Strategy_*` task or fixing linking issues if simple enough.310 3. Update `activeContext.md` detailing the identified issues and the plan/next step to address them.311 4. Perform Dispatcher MUP (Section IV). Update `.clinerules` `[LAST_ACTION_STATE]` reflecting the current incomplete status (e.g., `last_action: "Dispatcher: Strategy Phase Final Check Failed - [Specific Issue Summary]."`) and set `next_action` to the required corrective step (e.g., `"Unify Cycle Plan and Update project_roadmap.md"`, `"Orchestrate Area Planning"`, or a specific action like `"Complete Final Linking"`).312 5. State: "Corrective actions required before exiting Strategy Phase. Proceeding with `[Corrective Step]`."313 6. **Continue execution** based on the determined corrective step.314315## V. Mandatory Update Protocol (MUP) Additions (Strategy Plugin - Dispatcher Focus)316(This is Section V.A from the original combined plugin, lines 513-583, with `hierarchical_task_checklist_[cycle_id].md` changed to `current_cycle_checklist.md` and `roadmap_summary` to `project_roadmap.md` where appropriate.)317318* **(After Dispatcher Step 0 - Initialization):** Save/Update `hdta_review_progress` and `current_cycle_checklist.md`. Update `activeContext.md`. `.clinerules` `last_action: "Dispatcher: Completed Strategy Cycle Initialization (Step 0).", next_action: "Orchestrate Area Planning"`.319* **(After Dispatcher Step 1.E - Dispatching an Atomic Sub-Task):** `.clinerules` `last_action: "Dispatcher: Dispatched sub-task...", next_action: "Review Worker Completion..."`.320* **(After Dispatcher Step 1.G - Reviewing Worker Output):** Update `current_cycle_checklist.md`. Update Area Planning Log. Update `activeContext.md`. `.clinerules` `last_action: "Dispatcher: Reviewed Worker...", next_action: "Orchestrate Area Planning"`.321* **(After Dispatcher Step 1.A - Area planning complete):** Update `current_cycle_checklist.md`. Update `activeContext.md`. `.clinerules` `last_action: "Dispatcher: Completed all planning for Area...", next_action: "Orchestrate Area Planning"`.322* **(After Dispatcher Step 8 - Unification):** Ensure `project_roadmap.md` saved. Update `hdta_review_progress`. Update `current_cycle_checklist.md`. `.clinerules` `last_action: "Dispatcher: Completed Roadmap Unification (Step 8).", next_action: "Final Checks and Exit Strategy Phase"`.323* **(After Dispatcher Step 9 - Final Checks):** If Exiting: Update `activeContext.md`, Learning Journal, `.clinerules` for Execution. If Not Exiting: Update `activeContext.md`, `.clinerules` for corrective step.324325## VI. Quick Reference (Dispatcher Focus)326(This is tailored from Section VI of the original plugin, lines 599-639, focusing on Dispatcher items and updated file names.)327328**Primary Goal**: Orchestrate construction/refinement of `project_roadmap.md` by defining cycle goals, identifying Areas, delegating Area planning to Workers, reviewing outputs, and **unifying all work into a sequenced execution list within `project_roadmap.md`**.329330**Dispatcher Workflow Outline:**331* **Step 0: Initialize Strategy Cycle & Overall Goals**: Define cycle goals. ID Areas. Init `project_roadmap.md`, `current_cycle_checklist.md`. Output: Goals, Areas, trackers. Next Action: `Orchestrate Area Planning`.332* **Step 1: Main Orchestration Loop**: Outer Loop (Per Area): Select Area. Inner Loop (Per Sub-Task): Determine Sub-Task. Prep Handoff. `<new_task>` to Worker. Pause. Review Worker. Accept/Reject. If Area complete, mark in checklist. Output: Built HDTA for Areas.333* **Step 8: Unify Cycle Plan and Update `project_roadmap.md`**: (After all Areas planned). Consolidate Area plans. Review inter-area dependencies. Update `project_roadmap.md`. Output: Updated `project_roadmap.md`. Next Action: `Final Checks...`.334* **Step 9: Final Checks and Exit**: Verify completion criteria. If OK: MUP for Execution. Pause. If Not OK: Plan corrections, MUP for corrective step. Output: Validated roadmap, updated `.clinerules`.335336**Key Trackers & Files (Dispatcher Perspective):**337* `current_cycle_checklist.md`: Tracks high-level Area planning status for the cycle.338* `activeContext.md`: Overall cycle goals, current orchestration area, sub-task handoff details, revision notes.339* `hdta_review_progress_[session_id].md`: Tracks Dispatcher's review of `project_roadmap.md`.340* `.clinerules`: `[LAST_ACTION_STATE]` managed by Dispatcher.341* `project_roadmap.md`: Main project-wide roadmap, initialized in Step 0, updated in Step 8.342* `cline_docs/dispatch_logs/`: Contains Dispatcher Area Planning Logs and Worker Sub-Task Output Logs (read by Dispatcher).343* HDTA Files (created/updated by Workers, reviewed by Dispatcher).344345## VII. Flowchart (Dispatcher Focus)346(This is adapted from Section VII of the original plugin, lines 670-720, focusing on the Dispatcher Instance subgraph and using updated file names.)347```mermaid348graph TD349 %% Dispatcher Workflow350 subgraph Dispatcher Instance351 D_S0[Step 0: Initialize Cycle & Goals, ID Areas, Init Roadmap & Checklist] --> D_S1_OuterLoop{Outer Loop: Select Next Area};352353 D_S1_OuterLoop -- Area Found --> D_S1_InnerLoop{Inner Loop: Determine Next Atomic Sub-Task};354 D_S1_OuterLoop -- No More Areas --> D_S8[Step 8: Unify & Update project_roadmap.md];355356 D_S1_InnerLoop -- Sub-Task ID'd --> D_PrepareHandoff[Prep Handoff];357 D_PrepareHandoff --> D_NewTask[<new_task> to Worker];358 D_NewTask -- MUP --> D_Pause[Update .clinerules, Pause];359360 D_Pause --> D_ReviewWorker[Review Worker Output];361 D_ReviewWorker --> D_AcceptSubTask{Sub-Task OK?};362363 D_AcceptSubTask -- Yes --> D_IntegrateSubTask[Integrate, Update Area Log/activeContext for Next Sub-Task];364 D_IntegrateSubTask -- MUP --> D_S1_InnerLoop;365366 D_AcceptSubTask -- No --> D_NoteRevisions[Note Revisions in Area Log/activeContext];367 D_NoteRevisions -- MUP --> D_S1_InnerLoop;368369 D_S1_InnerLoop -- Area Planning Complete --> D_AreaComplete[Mark Area Planned];370 D_AreaComplete -- MUP --> D_S1_OuterLoop;371372 D_S8 --> D_S8_UpdateProjectRoadmap[Update project_roadmap.md];373 D_S8_UpdateProjectRoadmap -- MUP --> D_S9[Step 9: Final Checks & Exit];374 D_S9 -- All Criteria Met --> D_Exit[Phase Complete];375 D_S9 -- Criteria NOT Met --> D_Corrections[Plan Corrections];376 D_Corrections -- MUP --> D_S1_OuterLoop;377 end378```379*Note: This iterative Strategy phase, from the Dispatcher's view, focuses on orchestrating the creation of a detailed and actionable project roadmap by managing cycle goals and worker delegations, ensuring the main `project_roadmap.md` is consistently updated.*
Also in RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/cleanup_consolidation_plugin.md · 762 | Cline rules | monorepoagent-behaviour | 34/100 | 3 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/core_prompt(put this in Custom Instructions).md · 762 | Cline rules | lint-formatstylearchui+3 | 73/100 | 2 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/default-rules.md · 762 | Cline rules | style | 24/100 | 3 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/execution_plugin.md · 762 | Cline rules | no sections | 46/100 | 3 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/setup_maintenance_plugin.md · 762 | Cline rules | archdependenciesdo-notagent-behaviour | 73/100 | 2 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/setup_worker.md · 762 | Cline rules | apido-notagent-behaviour | 61/100 | 3 days ago | |
| RPG-fan/Cline-Recursive-Chain-of-Thought-System-CRCT-.clinerules/strategy_worker_plugin.md · 762 | Cline rules | style | 38/100 | 3 days ago |
Diff against .clinerules/cleanup_consolidation_plugin.md Diff against .clinerules/core_prompt(put this in Custom Instructions).md Diff against .clinerules/default-rules.md Diff against .clinerules/execution_plugin.md Diff against .clinerules/setup_maintenance_plugin.md Diff against .clinerules/setup_worker.md Diff against .clinerules/strategy_worker_plugin.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/pubmed-search-mcp.clinerules/50-pubmed-project.md · 23 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| ryok/python-boilerplate.clinerules/common-commands.md · 0 | Cline rules | setupbuildtestlint-format+3 | 90/100 | 2 days ago | |
| u9401066/pubmed-search-mcp.clinerules/00-project.md · 23 | Cline rules | testlint-formatstylearch+1 | 86/100 | 3 days ago | |
| u9401066/pubmed-search-mcp.clinerules/60-pubmed-python.md · 23 | Cline rules | setuptestlint-formatstyle+2 | 86/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/60-pubmed-python.md · 6 | Cline rules | setuptestlint-formatstyle+2 | 86/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/60-pubmed-python.md · 6 | Cline rules | setuptestlint-formatstyle+2 | 86/100 | 3 days ago |
