Cline rules
.clinerules/strategy_worker_plugin.mdCline rules
Quality
38/100
Scores the file, not the repository.Length
2,767 words
5 headings · 1 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 (Worker Focus)**23This Plugin provides detailed instructions and procedures for a **Worker** instance within the Strategy phase of the CRCT system. A Worker is invoked by a Dispatcher (using `strategy_dispatcher_plugin.md`) to perform a **single, specific, atomic planning sub-task** for a designated Area.45**Core Concept (Worker Perspective):**6- You are a **Worker** instance. Your sole focus is the atomic sub-task assigned by the Dispatcher.7- You will load minimal context relevant *only* to this sub-task.8- You will execute the sub-task, save precise outputs (primarily to a Worker Sub-Task Output Log file, and any HDTA files created/modified).9- You will use `<attempt_completion>` to signal completion of *your specific sub-task* back to the Dispatcher.10- **CRITICAL**: You DO NOT manage the overall phase or `.clinerules`.1112This plugin should be used in conjunction with the Core System Prompt.1314**IMPORTANT**15If you have already read a file (e.g., a plan you are updating) 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.16Do not use the tool XML tags in general responses, as it will activate the tool unintentionally.1718**DO NOT** clutter activeContext with detailed information. Use the appropriate documentation.1920**Entering Strategy Phase (Worker Role)**2122* You are triggered by a message from a Dispatcher instance, instructing you to assume the **Worker** role.23* Proceed directly to **Section I: Worker Task Execution** of this plugin, using the Dispatcher's message as your primary input for the sub-task.2425## I. Worker Task Execution: Performing Atomic Planning Sub-Tasks26(This corresponds to Section III of the original combined strategy_plugin.md)2728This section details the procedures for a **Worker** instance. You have received a **highly specific, atomic planning sub-task** related to a particular Area. Your sole responsibility is to execute *only that assigned sub-task*, load minimal context relevant *only* to that sub-task, save its precise outputs, and then signal completion. The Dispatcher's `<message>` will explicitly state which sub-task from this section (or a similar, clearly defined action) you must perform.2930**Guiding Principles (Worker Focus - Referenced from original combined plugin):**3132<<<**CRITICAL**>>>33*Before **any** planning activities, you **MUST** first assess the current state of relevant project artifacts. This includes:*34 * *Reading the actual code for any area/module/file being planned or potentially impacted.*35 * *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.*36*Failure to perform this comprehensive assessment, including reading dependent files, will lead to incomplete or flawed planning.*37* The files identified as dependencies through `show-dependencies` (sourced from project trackers) **MUST** then have their relevant sections read using `read_file`.3839**CRITICAL CONSTRAINT: MINIMAL CONTEXT LOADING.** Due to LLM context window limitations, each planning step MUST focus on loading and processing only the information strictly necessary for your assigned sub-task and area. Avoid loading entire large files if only sections or summaries are needed.40416. **Scoped Area Planning**: Focus *exclusively* on the detailed planning for the single area and sub-task assigned.427. **Minimal Context Loading (CRITICAL for Worker)**: Load only documents, dependency info, and file sections essential for your sub-task, based on Dispatcher pointers and your analysis.438. **Mandatory Dependency Analysis (Scoped & Deep by Worker)**:44 * **CRITICAL FIRST STEP for Area (if sub-task involves initial analysis or HDTA creation for an element within the area)**: Before detailed planning, analyze the assigned area element's specific dependencies using `show-keys` and `show-dependencies`.45 * **Leverage Visualizations**: Utilize relevant diagrams (paths provided by Dispatcher) or generate focused diagrams (`visualize-dependencies --key ...`) for your specific target.46 * **Deep Understanding**: Use `read_file` on *relevant sections* of linked files to understand *why* dependencies exist and the *implication* for implementation order.47 * **CRITICAL FAILURE**: Failure to check and understand relevant dependencies is a CRITICAL FAILURE.489. **Top-Down Review, Bottom-Up Task Building**: Review high-level context for your area/sub-task, then build out atomic Task Instructions if that's your sub-task.4910. **Atomic Task Instructions**: If your sub-task is to create tasks, decompose work into small, actionable `Strategy_*` or `Execution_*` tasks in `*.md` files. Ensure clear objectives, steps, minimal context links/dependencies. Consider atomicity.50 * **Handling Further Decomposition Needs**: If a step is too complex for one task, generally prefer creating a `Strategy_PlanSubComponent_[DetailName].md` task. The "Children" field in a `task_template.md` should be used sparingly, primarily for dynamically spawning minor follow-up `.md` tasks you also define. If "Children" are used, **explicitly list and detail them in your Worker Output File.**5111. **HDTA Creation/Update**: If your sub-task involves it, create/update HDTA documents (Domain Modules, Implementation Plans, Task Instructions) for your assigned area, using templates.5212. **Recursive Decomposition for Complexity**: If an aspect is too complex for immediate atomic task definition (and doesn't fit the "Children" use case above), create a `Strategy_PlanSubComponent_*.md` task. Note this clearly in your output.5313. **Clear Phase Labeling**: Prefix created tasks with `Strategy_*` or `Execution_*`.5414. **Scoped Progress Logging**: Update `hdta_review_progress_[session_id].md` for files it directly creates/modifies.5556**(Worker) Step W.1: Initialize Worker and Understand Assigned Sub-Task.**57(Corresponds to original combined plugin's Section III, Step W.1)58* **Directive**: Parse Dispatcher's `<message>`, ID sub-task, Area, context pointers.59* **Action A (Parse Message & Identify Sub-Task)**: Extract Area, Specific Sub-Task Directive, Revision Notes, Expected Outputs, paths to checklist, activeContext, and any specific files/diagrams for *this sub-task*.60* **Action B (Load Plugins/Context)**: Load this `strategy_worker_plugin.md`. Load minimal necessary sections of `activeContext.md`. If sub-task involves checklist, load it.61* **Action C (Acknowledge Role & Sub-Task)**: State: "Worker instance initialized. Area: `[Area]`. Sub-Task: `[Directive]`. Revision: `[Yes/No]`. Proceeding."62* **Action D (Create Worker Output File)**: Create `Worker_Output_[AreaName]_[SubTaskSummary]_[Timestamp].md` in `cline_docs/dispatch_logs/` from `worker_sub_task_output_template.md`. Populate header. Note path.63* **Update MUP**: Initial Worker MUP (Section II below) - log init in Worker Output file.6465**(Worker) Step W.2: Execute Assigned Atomic Planning Sub-Task.**66(Corresponds to original combined plugin's Section III, Step W.2)67* **Directive**: Perform ONLY the single, specific planning action from Dispatcher.68* Based on the "Specific Sub-Task Type", perform one of the following actions (or a similarly well-defined, granular operation if specified by the Dispatcher):6970 * **Sub-Task Type A: Initial State Assessment for Area**71 * **Instruction from Dispatcher will be like**: "Perform Initial State Assessment for Area `[Area Name]`. Read existing `[Area Name]_module.md` (if path provided and exists), and any `implementation_plan_*.md` files associated with it (Dispatcher may provide paths or instruct you to find them). Summarize their current status, completeness, and key planned features in the Worker Output file."72 * **Worker Actions**:73 1. Use `read_file` to load the specified `_module.md` and `implementation_plan_*.md` files for the `[Area Name]`. Load only these files.74 2. Analyze their content for current status, defined objectives, completeness of sections (e.g., task lists, sequences in plans).75 3. Construct a concise summary.76 4. Use `apply_diff` to append this summary to the Worker Sub-Task Output file created in Step W.1.77 5. State: "Worker completed Initial State Assessment for Area `[Area Name]`. Summary written to Worker Output file."78 6. Expected Output: Updated Worker Sub-Task Output file with the assessment summary.7980 * **Sub-Task Type B: Focused Dependency Analysis for Specific Key(s)/File(s)**81 * **Instruction from Dispatcher will be like**: "For Area `[Area Name]`, perform dependency analysis for key(s) `[key_A, key_B]` (or file `path/to/file.c`). Use `show-dependencies`. If diagram `path/to/diagram.md` is provided, consult it. Document key dependencies found, their types, and direct implications for sequencing or task interaction in the Worker Output file."82 * **Worker Actions**:83 1. Identify the target key(s) or file(s) from the directive.84 2. Execute `show-dependencies --key <target_key>` for each.85 3. If a diagram path was provided, use `read_file` to load its Mermaid content.86 4. If no diagram provided and analysis is complex for internal connections, Worker may (if allowed by Dispatcher or as a general capability) generate a highly focused diagram: `visualize-dependencies --key <target_key> --output {memory_dir}/WORKER_[AreaName]_[target_key]_deps.md`.87 5. Analyze the `show-dependencies` output and any diagram.88 6. Formulate a concise summary of key direct dependencies impacting the target(s) and their implications.89 7. Use `apply_diff` to append this summary to the Worker Sub-Task Output file created in Step W.1.90 8. State: "Worker completed Focused Dependency Analysis for `[target_key(s)/file]` in Area `[Area Name]`. Findings documented in Worker Output file."91 9. Expected Output: Updated Worker Sub-Task Output file. If diagram generated, new `.md` file in memory dir.9293 * **Sub-Task Type C: Create or Update Area Domain Module Outline/File**94 * **Instruction from Dispatcher will be like**: "For Area `[Area Name]`, create (if not exists) or update `[Area Name]_module.md` (at `path/to/[AreaName]_module.md`). Ensure its structure follows the `cline_docs/templates/module_template.md`. Incorporate relevant details from the Area's assessment and dependency analysis. If revising, address: `[Dispatcher feedback]`."95 * **Worker Actions**:96 1. Check if `[Area Name]_module.md` exists at specified path.97 2. If not, use `cline_docs/templates/module_template.md` as a base. If exists, `read_file` it.98 3. Populate/update the content based on area objectives (from `activeContext.md` via pointers) and findings from the Area's initial assessment and dependency analysis, ensuring the structure aligns with `cline_docs/templates/module_template.md`. Address any revision notes.99 4. Use `write_to_file` to save `[Area Name]_module.md`.100 5. Update `hdta_review_progress_[session_id].md` for this file.101 6. State: "Worker Created/Updated `[Area Name]_module.md` following the module template structure."102 7. Expected Output: Saved `[Area Name]_module.md` file. Updated `hdta_review_progress`.103104 * **Sub-Task Type D: Create or Update Specific Implementation Plan Outline/File**105 * **Instruction from Dispatcher will be like**: "For Area `[Area Name]`, create/update `implementation_plan_[FeatureName].md` (at `path/to/plan.md`). Define sections for Objective, Affected Components, High-Level Approach. Link it from `[Area Name]_module.md`. If revising, address: `[Dispatcher feedback]`."106 * **Worker Actions**:107 1. Check if `implementation_plan_[FeatureName].md` exists.108 2. If not, use `cline_docs/templates/implementation_plan_template.md`. If exists, `read_file` it.109 3. Populate/update content focusing *only* on the specified sections (Objective, Affected Components, High-Level Approach). Address revision notes. **Do not decompose tasks yet.**110 4. Use `write_to_file` to save `implementation_plan_[FeatureName].md`.111 5. Update `hdta_review_progress_[session_id].md`.112 6. If `[Area Name]_module.md` exists, `read_file` it, add a link to the new/updated plan, and `write_to_file` the module file again.113 7. State: "Worker Created/Updated `implementation_plan_[FeatureName].md` outline."114 8. Expected Output: Saved plan file, potentially updated module file, updated `hdta_review_progress`.115116 * **Sub-Task Type E: Decompose Plan Section into Atomic Task Instruction Files**117 * **Instruction from Dispatcher will be like**: "For `implementation_plan_[FeatureName].md`, focus on 'High-Level Approach section' (or specific step '#N. Step Title'). Decompose this into atomic `Strategy_*` or `Execution_*` task instruction files (`.md`). For each task, define Objective, Minimal Context (links to plan section, specific code if known), Steps, and placeholder Dependencies/Expected Output. Save task files (e.g., in `tasks/area_feature/`) and link them from the `Tasks` section of `implementation_plan_[FeatureName].md`."118 * **Worker Actions**:119 1. `read_file` `implementation_plan_[FeatureName].md`.120 2. Focus on the specified section/step.121 3. For each logical sub-action within that section:122 a. Determine prefix (`Strategy_*` or `Execution_*`).123 b. Create a new task file (e.g., `tasks/area_feature/Execution_ImplementPart1.md`) using `cline_docs/templates/task_template.md`.124 c. Populate: Objective, Parent (link to Plan), Context (link to Plan section, *minimal* other links), Steps. Leave Dependencies/Expected Output brief or as placeholders if full detail requires sequencing (next sub-task).125 d. `write_to_file` the task file.126 e. Update `hdta_review_progress_[session_id].md` for the task file.127 4. `read_file` `implementation_plan_[FeatureName].md` again (or use in-memory version if careful).128 5. Add links to all newly created task files in its "Task Decomposition" section.129 6. `write_to_file` the updated `implementation_plan_[FeatureName].md`.130 7. Update `hierarchical_task_checklist_[cycle_id].md`: Add new tasks under Plan/Area, mark as "[ ] Defined".131 8. State: "Worker decomposed `implementation_plan_[FeatureName].md#Section` into `[N]` task files. Plan updated with links. Task files saved to `[path]`."132 9. Expected Output: New task `.md` files, updated plan file, updated `hdta_review_progress`, updated checklist.133134 * **Sub-Task Type F: Sequence and Prioritize Tasks in an Implementation Plan**135 * **Instruction from Dispatcher will be like**: "For `implementation_plan_[FeatureName].md`, review its 'Task Decomposition' section and relevant dependency analysis findings (e.g., from `activeContext.md#DepAnalysisOutput_...`). Populate the 'Task Sequence / Build Order' and 'Prioritization within Sequence' sections. If revising, address: `[Dispatcher feedback]`."136 * **Worker Actions**:137 1. `read_file` `implementation_plan_[FeatureName].md`.138 2. Review listed tasks and any dependency notes (e.g., from `activeContext.md` pointed to by Dispatcher).139 3. Determine sequence based on task dependencies. Document sequence and rationale in "Task Sequence / Build Order".140 4. Determine priority. Document in "Prioritization within Sequence".141 5. Address any revision notes.142 6. `write_to_file` the updated `implementation_plan_[FeatureName].md`.143 7. Update `hdta_review_progress_[session_id].md`.144 8. Update task statuses in `hierarchical_task_checklist_[cycle_id].md` for this plan to "[ ] Sequenced & Prioritized".145 9. State: "Worker sequenced and prioritized tasks in `implementation_plan_[FeatureName].md`."146 10. Expected Output: Updated plan file, updated `hdta_review_progress`, updated checklist.147148 * **Sub-Task Type G: Execute a Specific Local `Strategy_*` Task File**149 * **Instruction from Dispatcher will be like**: "Execute the planning task defined in `path/to/Strategy_RefinePlanDetail_For_Feature.md`. This task involves [brief description of what the strategy task does, e.g., refining algorithm in Plan X]. Update affected documents as per its instructions."150 * **Worker Actions**:151 1. `read_file` the specified `Strategy_*.md` task file.152 2. Carefully follow its `Steps`. This might involve reading other plan/module files, performing analysis, and then updating specific sections of those HDTA documents, or even creating further `Execution_*` tasks.153 3. Ensure all HDTA documents modified/created as per the `Strategy_*` task's instructions are saved using `write_to_file`.154 4. Update `hdta_review_progress_[session_id].md` for all touched files.155 5. Mark the executed `Strategy_*.md` task file as complete (e.g., add "Status: Completed by Worker [Timestamp]" in its content) and save it.156 6. Update its status in `hierarchical_task_checklist_[cycle_id].md` to "[x] Completed `Strategy_{task_name}`".157 7. State: "Worker executed `Strategy_RefinePlanDetail_For_Feature.md`. Affected files updated: `[List]`. Task marked complete."158 8. Expected Output: Updated HDTA files, updated `Strategy_*.md` file itself, updated `hdta_review_progress`, updated checklist.159160 * **(If Dispatcher provides a sub-task not perfectly matching above types, follow its specific directive carefully, focusing on the single atomic action and its defined outputs.)**161* **State**: "Worker completed assigned sub-task: `[Directive]`. Outputs generated."162* **Update MUP**: Worker MUP (Section II below).163164**(Worker) Step W.3: Final Worker MUP & Completion Signal.**165(Corresponds to original combined plugin's Section III, Step W.3)166* **Directive**: Ensure outputs saved, update notes, signal completion.167* **Action A (Final Save Check & Output Verification)**: Verify all files for *this sub-task* saved.168* **Action B (Update Trackers for Sub-Task Outputs)**: Ensure `hdta_review_progress` and `current_cycle_checklist.md` updated for *this sub-task's outputs*.169* **Action C (Finalize Worker Output File)**: Complete Worker Output file, status "[x] Completed", final notes. This is primary output for Dispatcher.170* **Action D (Attempt Completion)**: Use `<attempt_completion>`.171* **State**: "Worker completed specific sub-task: `[Directive]`. Outputs saved. Signaling completion."172173## II. Mandatory Update Protocol (MUP) Additions (Strategy Plugin - Worker Focus)174(This is Section V.B from the original combined plugin, with `hierarchical_task_checklist_[cycle_id].md` becoming `current_cycle_checklist.md` if referred to.)175176**After Core MUP steps (Section VI of Core Prompt):**177178* **(After Worker Step W.1 - Initialization):** Update Worker Sub-Task Output file: "Worker initialized for sub-task..."179* **(After completing main action of Worker Step W.2):** Ensure outputs saved. Update `hdta_review_progress`. If sub-task involved checklist updates for tasks *it created/modified*, update `current_cycle_checklist.md` for those specific task statuses. Update Worker Sub-Task Output file: "Worker completed sub-task... Outputs: `[List]`."180* **(During Worker Step W.3 - Final MUP - Actions A, B, C before D):** Final save check. Final updates to `hdta_review_progress` and `current_cycle_checklist.md` for *this sub-task's outputs*. Final summary in Worker Output file.181* **CRITICAL FOR WORKER**: Worker **MUST NOT** update `.clinerules` `[LAST_ACTION_STATE]`. Worker does not update overall Area status in `current_cycle_checklist.md`.182183## III. Quick Reference (Worker Focus)184(This is tailored from Section VI of the original plugin.)185186**Worker Workflow Outline (Triggered by a message for one atomic sub-task):**187* **Step W.1: Initialize & Understand Assigned Sub-Task**: Parse message. Load this plugin & minimal context. Create Worker Output file.188* **Step W.2: Execute Assigned Atomic Planning Sub-Task**: Perform *only* the single action (e.g., area assessment, dep analysis, HDTA create/update, task decomp, sequence, exec local Strategy task).189* **Step W.3: Final Worker MUP & Completion Signal**: Verify saves. Update trackers for sub-task. Finalize Worker Output. Use `<attempt_completion>`.190191**Key Files for Worker (primarily interacts with, as per sub-task):**192* `current_cycle_checklist.md` (for updating status of tasks it creates/defines).193* `activeContext.md` (reads overall goals if needed; Dispatcher may specify a section for Worker to write detailed findings if Worker Output Log is insufficient).194* `hdta_review_progress_[session_id].md` (updates for files it touches).195* Specific HDTA Files (`_module.md`, `implementation_plan_*.md`, task `.md`) it's tasked to create/update.196* `Worker_Output_[AreaName]_[SubTaskSummary]_[Timestamp].md` (primary log of its actions/outputs for this sub-task).197* `cline_docs/templates/*` (uses these to create new HDTA docs).198199## IV. Flowchart (Worker Focus)200(This is adapted from Section VII of the original plugin.)201```mermaid202graph TD203 %% Worker Workflow204 subgraph Worker Instance (Executes One Atomic Sub-Task)205 W_Start(Triggered by Dispatcher Message) --> W_S1_Init[W.1: Initialize from Dispatcher Message];206 W_S1_Init -- MUP_Log --> W_S2_Execute[W.2: Execute ONLY Assigned Atomic Sub-Task];207 W_S2_Execute -- MUP_SaveOutput --> W_S3_FinalMUP[W.3: Final Worker MUP];208 W_S3_FinalMUP --> W_End[Use <attempt_completion>];209 end210```211*Note: The Worker's role is highly focused on executing a single, well-defined planning sub-task with minimal context, then reporting its specific outputs back to the Dispatcher. When creating new files be sure to reference the appripriate template file located in `cline_docs\templates`.*
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_dispatcher_plugin.md · 762 | Cline rules | styleagent-behaviour | 46/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_dispatcher_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 |
