Analyzing Projects
Project Analysis Workflow
Copy this checklist and track progress:
Project Analysis Progress:
- [ ] Step 1: Quick overview (README, root files)
- [ ] Step 2: Detect tech stack
- [ ] Step 3: Map project structure
- [ ] Step 4: Identify key patterns
- [ ] Step 5: Find development workflow
- [ ] Step 6: Generate summary report
Step 1: Quick Overview
# Check for common project markers
ls -la
cat README.md 2>/dev/null | head -50
Step 2: Tech Stack Detection
Package Managers & Dependencies
package.json → Node.js/JavaScript/TypeScript
requirements.txt / pyproject.toml / setup.py → Python
go.mod → Go
Cargo.toml → Rust
pom.xml / build.gradle → Java
Gemfile → Ruby
Frameworks (from dependencies)
- React, Vue, Angular, Next.js, Nuxt
- Express, FastAPI, Django, Flask, Rails
- Spring Boot, Gin, Echo
Infrastructure
Dockerfile, docker-compose.yml → Containerized
kubernetes/, k8s/ → Kubernetes
terraform/, .tf files → IaC
serverless.yml → Serverless Framework
.github/workflows/ → GitHub Actions
Step 3: Project Structure Analysis
Present as a tree with annotations:
project/
├── src/ # Source code
│ ├── components/ # UI components (React/Vue)
│ ├── services/ # Business logic
│ ├── models/ # Data models
│ └── utils/ # Shared utilities
├── tests/ # Test files
├── docs/ # Documentation
└── config/ # Configuration
Step 4: Key Patterns Identification
Look for and report:
- Architecture: Monolith, Microservices, Serverless, Monorepo
- API Style: REST, GraphQL, gRPC, tRPC
- State Management: Redux, Zustand, MobX, Context
- Database: SQL, NoSQL, ORM used
- Authentication: JWT, OAuth, Sessions
- Testing: Jest, Pytest, Go test, etc.
Step 5: Development Workflow
Check for:
.eslintrc, .prettierrc → Linting/Formatting
.husky/ → Git hooks
Makefile → Build commands
resources/ in package.json → NPM scripts
Step 6: Output Format
Generate a summary using this template:
# Project: [Name]
## Overview
[1-2 sentence description]
## Tech Stack
| Category | Technology |
|----------|------------|
| Language | TypeScript |
| Framework | Next.js 14 |
| Database | PostgreSQL |
| ... | ... |
## Architecture
[Description with simple ASCII diagram if helpful]
## Key Directories
- `src/` - [purpose]
- `lib/` - [purpose]
## Entry Points
- Main: `src/index.ts`
- API: `src/api/`
- Tests: `npm test`
## Conventions
- [Naming conventions]
- [File organization patterns]
- [Code style preferences]
## Quick Commands
| Action | Command |
|--------|---------|
| Install | `npm install` |
| Dev | `npm run dev` |
| Test | `npm test` |
| Build | `npm run build` |
Analysis Validation
After completing analysis, verify:
Analysis Validation:
- [ ] All major directories explained
- [ ] Tech stack accurately identified
- [ ] Entry points documented
- [ ] Development commands verified working
- [ ] No assumptions made without evidence
If any items cannot be verified, note them as "needs clarification" in the report.
1---2name: analyzing-projects-23description: Analyzes codebases to understand structure, tech stack, patterns, and conventions. Use when onboarding to a new project, exploring unfamiliar code, or when asked "how does this work?" or "what's the architecture?"4---5
6# Analyzing Projects
7
8## Project Analysis Workflow
9
10Copy this checklist and track progress:
11
12```
13Project Analysis Progress:
14- [ ] Step 1: Quick overview (README, root files)
15- [ ] Step 2: Detect tech stack
16- [ ] Step 3: Map project structure
17- [ ] Step 4: Identify key patterns
18- [ ] Step 5: Find development workflow
19- [ ] Step 6: Generate summary report
20```
21
22## Step 1: Quick Overview
23
24```bash
25# Check for common project markers
26ls -la
27cat README.md 2>/dev/null | head -50
28```
29
30## Step 2: Tech Stack Detection
31
32### Package Managers & Dependencies
33- `package.json` → Node.js/JavaScript/TypeScript
34- `requirements.txt` / `pyproject.toml` / `setup.py` → Python
35- `go.mod` → Go
36- `Cargo.toml` → Rust
37- `pom.xml` / `build.gradle` → Java
38- `Gemfile` → Ruby
39
40### Frameworks (from dependencies)
41- React, Vue, Angular, Next.js, Nuxt
42- Express, FastAPI, Django, Flask, Rails
43- Spring Boot, Gin, Echo
44
45### Infrastructure
46- `Dockerfile`, `docker-compose.yml` → Containerized
47- `kubernetes/`, `k8s/` → Kubernetes
48- `terraform/`, `.tf` files → IaC
49- `serverless.yml` → Serverless Framework
50- `.github/workflows/` → GitHub Actions
51
52## Step 3: Project Structure Analysis
53
54Present as a tree with annotations:
55```
56project/
57├── src/ # Source code
58│ ├── components/ # UI components (React/Vue)
59│ ├── services/ # Business logic
60│ ├── models/ # Data models
61│ └── utils/ # Shared utilities
62├── tests/ # Test files
63├── docs/ # Documentation
64└── config/ # Configuration
65```
66
67## Step 4: Key Patterns Identification
68
69Look for and report:
70- **Architecture**: Monolith, Microservices, Serverless, Monorepo
71- **API Style**: REST, GraphQL, gRPC, tRPC
72- **State Management**: Redux, Zustand, MobX, Context
73- **Database**: SQL, NoSQL, ORM used
74- **Authentication**: JWT, OAuth, Sessions
75- **Testing**: Jest, Pytest, Go test, etc.
76
77## Step 5: Development Workflow
78
79Check for:
80- `.eslintrc`, `.prettierrc` → Linting/Formatting
81- `.husky/` → Git hooks
82- `Makefile` → Build commands
83- `resources/` in package.json → NPM scripts
84
85## Step 6: Output Format
86
87Generate a summary using this template:
88
89```markdown
90# Project: [Name]
91
92## Overview
93[1-2 sentence description]
94
95## Tech Stack
96| Category | Technology |
97|----------|------------|
98| Language | TypeScript |
99| Framework | Next.js 14 |
100| Database | PostgreSQL |
101| ... | ... |
102
103## Architecture
104[Description with simple ASCII diagram if helpful]
105
106## Key Directories
107- `src/` - [purpose]
108- `lib/` - [purpose]
109
110## Entry Points
111- Main: `src/index.ts`
112- API: `src/api/`
113- Tests: `npm test`
114
115## Conventions
116- [Naming conventions]
117- [File organization patterns]
118- [Code style preferences]
119
120## Quick Commands
121| Action | Command |
122|--------|---------|
123| Install | `npm install` |
124| Dev | `npm run dev` |
125| Test | `npm test` |
126| Build | `npm run build` |
127```
128
129## Analysis Validation
130
131After completing analysis, verify:
132
133```
134Analysis Validation:
135- [ ] All major directories explained
136- [ ] Tech stack accurately identified
137- [ ] Entry points documented
138- [ ] Development commands verified working
139- [ ] No assumptions made without evidence
140```
141
142If any items cannot be verified, note them as "needs clarification" in the report.