Taking over a codebase
Give GLM-5.2 the directory tree, the README and the main entry points, and have it map which module does what and where a change should go. Check the map against the code before you rely on it.
Example: Where should the new export feature go?
Material
- Directory tree
- api/routes/invoices.ts · services/invoices/query.ts · services/reports/pdf.ts · workers/email.ts · shared/format/money.ts
- README
- Routes stay thin and call services. Anything that formats money must use shared/format.
PromptUsing the directory tree and README, say which modules a CSV export of invoices would touch and where the new code should live.
Sample answer · written by hand to show the reasoning
Add a route in api/routes/invoices.ts that only parses the filters and calls a new services/reports/csv.ts, placed next to pdf.ts. The CSV service reads rows through services/invoices/query.ts and formats amounts with shared/format/money.ts, as the README requires. workers/email.ts is untouched unless exports should also be emailed.