Prompt file imported from shakesoft/timekeeper (
.windsurf/workflows/code-explain.md). Copyright stays with the author.
Code Explain
Explain code's layer, dependencies, architectural role, and how it connects to other layers.
Usage
Invoke with: /code-explain <file-path>
Provide the file path or select code before invoking this command.
What It Does
Reads the specified file or code and explains:
- Which layer it belongs to (Core, Application.Shared, Application, EntityFrameworkCore, Web, Angular, React)
- What it does — purpose and responsibilities
- Dependencies — what it depends on and what depends on it
- Conventions — how it follows (or violates) ASP.NET Zero patterns
- Data flow — how data flows through this code
Output Format
## Code Explanation: {FileName}
### Layer
{Core | Application.Shared | Application | EntityFrameworkCore | Web | Angular | React}
### Purpose
{What this code does and why}
### Key Dependencies
- Depends on: [list of injected services/repositories]
- Used by: [list of callers if discoverable]
### Patterns Used
- {Pattern}: {how it's used}
### Data Flow
{How data enters, transforms, and exits this code}
### Potential Issues
{Any convention violations or concerns}
Example
/code-explain aspnet-core/src/CadentManagement.Application/Editions/EditionAppService.cs
