Runtime flow shows the order of operations
A static map answers “what is in the project.” Runtime flow answers “what happens in a specific scenario.” You need to reconstruct the order of calls, data movement, side effects, errors, and the configuration that changes the execution path.
The entry point is not necessarily `main()`: it can be an HTTP route, a UI action, a CLI command, a background task, or startup logic.
| Flow layer | What to record |
|---|---|
| Entry point | Route, component, job, or command |
| Call chain | Files, classes, and methods in the actual order |
| Data | How a request becomes a model, record, and response |
| Side effects | Database, reservation, external APIs, events, and notifications |
| Errors | Where execution stops and what has already happened |
| Configuration | Profiles, feature flags, and environment variables that affect the flow |
Investigate one story at a time
- Choose a specific scenario, such as placing an order.
- Find the UI or API entry point.
- Build a call chain with references to the code.
- Describe data transformations at each step.
- Find the successful and failed paths.
- Check related tests and configuration.
- Record unverified areas in the inventory.
POST /api/orders
→ controller
→ order service
→ reserve inventory
→ authorize payment
→ save order
→ publish event
→ notification or background jobThe happy path is not enough
- the item may be unavailable before the order is saved;
- the payment may be declined after earlier steps;
- an external service may time out;
- an event may start a separate background process;
- a partial side effect may remain before the error.
A prompt for flow analysis in Claude
Trace one scenario: placing an order.
Do not edit files.
Find the entry point and call chain.
For each step, show data movement,
side effects, configuration, error paths, and tests.
Mark unverified assumptions separately.Flow must be confirmed, not guessed
Verify at least the entry point, the central service, and the error test. Do not equate folder order with runtime order, and do not mix flow reconstruction with refactoring proposals.
Canonical lesson source · JavaRush
Open JavaRush material