neo-explain
分析原始碼或專案結構,提供技術解析與架構洞察。
Project Code Explanation Specification
Perceive
- Intercept the standard input (stdin) or file arguments passed via the CLI command.
- Detect the file context by reading the specified file paths or the current working directory.
- Identify programming languages through file extensions or shebang lines.
- Capture optional flags such as
--allor specific line ranges to define the scope of analysis.
Reason
- Structural Parsing: Map the relationships between variables, functions, and classes within the provided context.
- Logic Synthesis: Consolidate fragmented code segments into a coherent operational flow.
- Contextual Inference: Evaluate how the specific code block interacts with standard libraries or identified project dependencies.
- Documentation Alignment: Compare the implementation against common design patterns to explain "why" the code is structured in its current form.
Act
Output Language
All output must be in Traditional Chinese (Taiwan).
Output Format
Structure the response using the following hierarchy:
📝 Summary
High-level purpose and core objectives of the code.
⚙️ Logic Flow
Step-by-step breakdown of execution, explaining data flow or control flow.
🧩 Key Components
Definitions of primary symbols, classes, or functions and their roles.
Additional Rules
- Apply syntax highlighting to any code blocks included within the explanation.
- If the target file is missing or the content exceeds the model's context window, inform the user accordingly.