From 5e85a23aa2181530955cb2b7a11b2e4917ff610e Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Thu, 19 Mar 2026 10:31:22 +0800 Subject: [PATCH] refactor: move pipeline agents into skills/understand/ as prompt templates Co-Authored-By: Claude Opus 4.6 (1M context) --- .../understand/architecture-analyzer-prompt.md} | 9 +++------ .../understand/file-analyzer-prompt.md} | 9 +++------ .../understand/graph-reviewer-prompt.md} | 9 +++------ .../understand/project-scanner-prompt.md} | 9 +++------ .../understand/tour-builder-prompt.md} | 9 +++------ 5 files changed, 15 insertions(+), 30 deletions(-) rename understand-anything-plugin/{agents/architecture-analyzer.md => skills/understand/architecture-analyzer-prompt.md} (97%) rename understand-anything-plugin/{agents/file-analyzer.md => skills/understand/file-analyzer-prompt.md} (98%) rename understand-anything-plugin/{agents/graph-reviewer.md => skills/understand/graph-reviewer-prompt.md} (97%) rename understand-anything-plugin/{agents/project-scanner.md => skills/understand/project-scanner-prompt.md} (97%) rename understand-anything-plugin/{agents/tour-builder.md => skills/understand/tour-builder-prompt.md} (97%) diff --git a/understand-anything-plugin/agents/architecture-analyzer.md b/understand-anything-plugin/skills/understand/architecture-analyzer-prompt.md similarity index 97% rename from understand-anything-plugin/agents/architecture-analyzer.md rename to understand-anything-plugin/skills/understand/architecture-analyzer-prompt.md index dfa3293..d5ba170 100644 --- a/understand-anything-plugin/agents/architecture-analyzer.md +++ b/understand-anything-plugin/skills/understand/architecture-analyzer-prompt.md @@ -1,9 +1,6 @@ ---- -name: architecture-analyzer -description: Analyzes codebase structure to identify architectural layers (API, Service, Data, UI, etc.) and assign files to logical groupings. Use after file analysis is complete. -tools: Bash, Read, Grep, Glob, Write -model: opus ---- +# Architecture Analyzer — Prompt Template + +> Used by `/understand` Phase 4. Dispatch as a subagent with this full content as the prompt. You are an expert software architect. Your job is to analyze a codebase's file structure, summaries, and import relationships to identify logical architectural layers and assign every file to exactly one layer. Your layer assignments must be well-reasoned and reflect the actual organization of the code. diff --git a/understand-anything-plugin/agents/file-analyzer.md b/understand-anything-plugin/skills/understand/file-analyzer-prompt.md similarity index 98% rename from understand-anything-plugin/agents/file-analyzer.md rename to understand-anything-plugin/skills/understand/file-analyzer-prompt.md index 9a26e42..4f28e77 100644 --- a/understand-anything-plugin/agents/file-analyzer.md +++ b/understand-anything-plugin/skills/understand/file-analyzer-prompt.md @@ -1,9 +1,6 @@ ---- -name: file-analyzer -description: Analyzes source code files to extract structure (functions, classes, imports), generate summaries, assign complexity ratings, and identify relationships. Use when building or updating a knowledge graph. -tools: Bash, Read, Glob, Grep, Write -model: opus ---- +# File Analyzer — Prompt Template + +> Used by `/understand` Phase 2. Dispatch as a subagent with this full content as the prompt. You are an expert code analyst. Your job is to read source files and produce precise, structured knowledge graph data (nodes and edges) that accurately represents the code's structure, purpose, and relationships. You must be thorough yet concise, and every piece of data you produce must be grounded in the actual source code. diff --git a/understand-anything-plugin/agents/graph-reviewer.md b/understand-anything-plugin/skills/understand/graph-reviewer-prompt.md similarity index 97% rename from understand-anything-plugin/agents/graph-reviewer.md rename to understand-anything-plugin/skills/understand/graph-reviewer-prompt.md index eeadfc8..f141521 100644 --- a/understand-anything-plugin/agents/graph-reviewer.md +++ b/understand-anything-plugin/skills/understand/graph-reviewer-prompt.md @@ -1,9 +1,6 @@ ---- -name: graph-reviewer -description: Validates knowledge graph completeness, referential integrity, and quality. Use as a final quality check after graph assembly. -tools: Bash, Read, Write, Glob, Grep -model: sonnet ---- +# Graph Reviewer — Prompt Template + +> Used by `/understand` Phase 6. Dispatch as a subagent with this full content as the prompt. You are a rigorous QA validator for knowledge graphs produced by the Understand Anything analysis pipeline. Your job is to systematically check the assembled graph for correctness, completeness, and quality, then render an approval or rejection decision with clear justification. diff --git a/understand-anything-plugin/agents/project-scanner.md b/understand-anything-plugin/skills/understand/project-scanner-prompt.md similarity index 97% rename from understand-anything-plugin/agents/project-scanner.md rename to understand-anything-plugin/skills/understand/project-scanner-prompt.md index 70ab1cb..30112ab 100644 --- a/understand-anything-plugin/agents/project-scanner.md +++ b/understand-anything-plugin/skills/understand/project-scanner-prompt.md @@ -1,9 +1,6 @@ ---- -name: project-scanner -description: Scans a project directory to discover source files, detect programming languages and frameworks, and estimate analysis scope. Use when starting codebase analysis. -tools: Bash, Glob, Grep, Read, Write -model: sonnet ---- +# Project Scanner — Prompt Template + +> Used by `/understand` Phase 1. Dispatch as a subagent with this full content as the prompt. You are a meticulous project inventory specialist. Your job is to scan a codebase directory and produce a precise, structured inventory of all source files, detected languages, frameworks, and estimated complexity. Accuracy is paramount -- every file path you report must actually exist on disk. diff --git a/understand-anything-plugin/agents/tour-builder.md b/understand-anything-plugin/skills/understand/tour-builder-prompt.md similarity index 97% rename from understand-anything-plugin/agents/tour-builder.md rename to understand-anything-plugin/skills/understand/tour-builder-prompt.md index 6f6ed69..1e46f55 100644 --- a/understand-anything-plugin/agents/tour-builder.md +++ b/understand-anything-plugin/skills/understand/tour-builder-prompt.md @@ -1,9 +1,6 @@ ---- -name: tour-builder -description: Creates guided learning tours for codebases, designing step-by-step walkthroughs that teach project architecture and key concepts. Use after architecture analysis is complete. -tools: Bash, Read, Grep, Glob, Write -model: opus ---- +# Tour Builder — Prompt Template + +> Used by `/understand` Phase 5. Dispatch as a subagent with this full content as the prompt. You are an expert technical educator who designs learning paths through codebases. Your job is to create a guided tour of 5-15 steps that teaches someone the project's architecture and key concepts in a logical, pedagogical order. Each step should build on previous ones, creating a coherent narrative that takes a newcomer from "What is this project?" to "I understand how it works."