Loading...
Loading...
Create a comprehensive inventory of a codebase. Map structure, entry points, services, infrastructure, domain models, and data flows. Pure documentation—no opinions or recommendations. Use when onboarding to an unfamiliar codebase, documenting existing architecture before changes, preparing for architecture reviews or migration planning, or creating a reference for the team. Triggers on requests like "map this codebase", "document the architecture", "create an inventory", or "what does this codebase contain".
npx skill4agent add neversight/skills_feed codebase-librarian./docs/inventory.md./architecture/inventory.mdMakefilepyproject.tomlsetup.pypyproject.tomlrequirements.txtsetup.pygo.modCargo.toml.env.exampleconfig/README.mddocs/ARCHITECTURE.mdCONTRIBUTING.mdREADME*, ARCHITECTURE*, CONTRIBUTING*
pyproject.toml, requirements.txt, setup.py, go.mod, Cargo.toml
Makefile, Dockerfile, docker-compose*
.env.example, config/, settings/routes/, controllers/, handlers/, api/
*_handler.py, *_controller.py, views.py, endpoints.py
cli/, commands/, __main__.py
workers/, jobs/, queues/, consumers/, tasks/
celery*, scheduler*, cron*services/, modules/, domains/, features/, packages/
*_service.py, *_manager.py, *_handler.py
internal/, core/, shared/, common/, lib/| Service | Location | Responsibility | Dependencies | Dependents |
|---|---|---|---|---|
| UserService | | User CRUD, auth | Database, EmailService | OrderService, AuthHandler |
database/, db/, repositories/, models/
cache/, redis/, memcache/
queue/, messaging/, events/, pubsub/
clients/, integrations/, external/, adapters/
*_client.py, *_adapter.py, *_gateway.py, *_provider.py| Component | Type | Location | How Accessed | Used By |
|---|---|---|---|---|
| PostgreSQL | Database | | SQLAlchemy ORM | UserRepo, OrderRepo |
| Stripe | Payment API | | Direct SDK | PaymentService |
| Redis | Cache | | redis-py client | SessionService, RateLimiter |
models/, entities/, domain/, core/
types/, schemas/, dataclasses/
*_entity.py, *_model.py, *_aggregate.py
events/, domain_events/| Entity | Location | Key Fields | Relationships | Business Rules |
|---|---|---|---|---|
| Order | | id, status, total, user_id | has_many LineItems, belongs_to User | Status transitions, pricing |
Flow: Create Order
1. POST /orders → create_order (api/orders.py:24)
2. → OrderService.create_order (services/order.py:45)
3. → validates input (services/order.py:52)
4. → OrderRepository.save (repositories/order.py:30)
5. → SQLAlchemy INSERT (models/order.py)
6. → emit OrderCreated event (services/order.py:78)
7. → EmailService.send_confirmation (services/email.py:15)
8. ← return order DTO# Codebase Inventory: [Project Name]
**Generated**: [Date]
**Scope**: [Full codebase / specific module]
## Project Overview
- **Language/Framework**:
- **Build System**:
- **Key Dependencies**:
## Entry Points
| Type | Location | Count | Notes |
|------|----------|-------|-------|
| HTTP Routes | `api/*.py` | 24 | FastAPI router |
| Background Workers | `workers/*.py` | 3 | Celery tasks |
| CLI Commands | `cli/` | 5 | Click/Typer |
## Services
| Service | Location | Responsibility | Dependencies | Dependents |
|---------|----------|----------------|--------------|------------|
## Infrastructure
| Component | Type | Location | Access Pattern | Used By |
|-----------|------|----------|----------------|---------|
## Domain Model
| Entity | Location | Key Fields | Relationships |
|--------|----------|------------|---------------|
## Data Flows
### Flow 1: [Name]
[Step-by-step trace with file:line references]
### Flow 2: [Name]
[Step-by-step trace with file:line references]
## Observed Patterns
- **Layering**:
- **Dependency Management**:
- **Error Handling**:
- **Testing Strategy**:
## Key File References
| Area | Key Files |
|------|-----------|
| Entry points | |
| Core services | |
| Data access | |
| External integrations | |