UNPKG

mcp-chain-of-thought

Version:

Chain of Thought is a tool built for AI Agents, emphasizing chain-of-thought, reflection, and style consistency. It converts natural language into structured dev tasks with dependency tracking and iterative refinement, enabling agent-like developer behavi

34 lines 3.52 kB
{ "tasks": [ { "id": "c2122306-39bc-465f-995b-cd84e03bcd4f", "name": "Verify Generator Template Paths", "description": "Audit all `.ts` files in `src/prompts/generators` to ensure that the path arguments passed to `loadPromptFromTemplate` correspond to existing markdown files within the `src/prompts/templates_en` directory structure. Report any discrepancies found.", "status": "Completed", "dependencies": [], "createdAt": "2025-05-05T08:00:18.925Z", "updatedAt": "2025-05-05T08:03:58.223Z", "relatedFiles": [ { "path": "src/prompts/generators/", "type": "REFERENCE", "description": "Directory containing the generator TypeScript files to be scanned." }, { "path": "src/prompts/templates_en/", "type": "REFERENCE", "description": "Base directory containing the markdown templates." }, { "path": "src/prompts/loader.ts", "type": "REFERENCE", "description": "File containing the `loadPromptFromTemplate` helper function." } ], "implementationGuide": "1. Identify all `.ts` files in `src/prompts/generators`.\n2. For each file, find all calls to `loadPromptFromTemplate(path_argument)`.\n3. Extract the `path_argument` string literal.\n4. Check if the file at `src/prompts/templates_en/${path_argument}` exists using file system checks (e.g., `fs.existsSync` in Node.js).\n5. Collect a list of any generator files and the corresponding non-existent template paths.\n6. If discrepancies are found, list them clearly (e.g., 'File: src/prompts/generators/someGenerator.ts - Missing Template: someDir/missing.md').\n7. If no discrepancies are found, report success.\n\nPseudocode Reference:\n```\nFUNCTION verify_generator_templates(generator_dir, template_base_dir):\n generator_files = list_files(generator_dir, pattern='*.ts')\n discrepancies = []\n\n FOR file_path IN generator_files:\n content = read_file(file_path)\n # Use regex or AST parsing to find calls\n template_calls = find_calls(content, function_name='loadPromptFromTemplate') \n \n FOR call IN template_calls:\n relative_template_path = extract_string_argument(call, index=0)\n IF relative_template_path IS NOT NULL:\n expected_template_full_path = join_path(template_base_dir, relative_template_path)\n \n IF NOT file_exists(expected_template_full_path):\n add_discrepancy(discrepancies, file_path, relative_template_path, expected_template_full_path)\n\n RETURN discrepancies\n```", "verificationCriteria": "A report is generated (e.g., console output or a file) that either confirms all template paths are valid or lists each generator file (`.ts`) and the specific invalid/missing template path string it references via `loadPromptFromTemplate`. The check must cover all `.ts` files in `src/prompts/generators`.", "completedAt": "2025-05-05T08:03:58.221Z", "summary": "Successfully audited all generator files in `src/prompts/generators`. Identified several discrepancies:\n1. `deleteTask.ts` references missing templates: `taskCompleted.md` (likely `completed.md`) and `result.md`.\n2. `getTaskDetail.ts` references a missing template (`analysisResult.md`) and uses/references a file with a typo (`complatedSummary.md`).\n3. `processThought.ts` uses/references a file with a typo (`complatedThought.md`).\nAll other generators reference valid templates." } ] }