retrofit-existing-projectlisted
Install: claude install-skill uchetsai-creator/project_starter_v5
# Retrofitting an Existing Project
The goal is to describe what already exists — not to redesign it. Read the codebase first, then fill in the documents to reflect reality.
Do not scan the entire repository at once. Work module by module.
---
## Step 1 — Understand the system (read before writing anything)
1. Read the entry point to understand the overall structure
(e.g. main file, router, app bootstrap, CLI entry, index)
2. Read the data layer to understand the data model
(e.g. Prisma schema, SQL DDL, ORM models, migration files)
3. Read one complete vertical slice to understand the layering pattern
(e.g. controller → service → repository, view → serializer → model, handler → usecase → store)
## Step 1b — Run the module inventory scan
```
python3 docs/script/scanners/scan_codebase.py <src_dir> --project-type <type> --docs docs
```
Review the output with the user:
- ✅ folders are confirmed as documented
- ❌ folders → ask the user: "Is this a module that needs documentation, a shared utility, or something else?"
- — folders → confirm they do not need a flow file
If the output shows `Coverage: 0/0 (100%)` alongside a `[WARN]` about real files existing, do
NOT treat that as "nothing to document" — it means the src layout defeated folder-based
classification (flat files with no subfolders, `--depth` too shallow, or a naming collision with
the Shared/Infrastructure patterns). Re-run with a higher `--depth`, or ask the user to confirm
the actual module boundaries