Plan and design with Niro
Before you change code, find out what the change reaches. Niro answers in both directions:
- Upstream: what depends on the code (its callers, and services that call it over HTTP or through events).
- Downstream: what the code depends on (what it calls, the tables it reads and writes, the events it sends).
Who and how
- Who: a developer planning a change, or a planning agent.
- How: a coding agent connected over MCP (see Connect your coding agent to Niro), or the terminal:
niro ask get_blast_radius method_fqn=OrderService.cancel
niro ask get_impact_analysis http_path=/api/orders
Which tool answers which question
| Question | Tool |
|---|---|
| What does a change to this method reach, both ways? | get_blast_radius (default depth 3, from 1 to 5) |
| What breaks if this method, class, route or event changes? | get_impact_analysis (upstream by default) |
| Which routes does this project serve, and which does it call? | find_api_endpoints, find_outbound_http_calls |
| Which events are sent and handled? | list_events, get_event_producers_and_handlers |
| Does similar code already exist? | code_grep (text search), resolve_name (find a name), list_types (every class by name) |
Finding reusable code by meaning is not in this release. The tool for it, find_reusable_code, needs LLM documentation, which this release does not include. Use code_grep and list_types instead.
Reading the answer
- An answer marked "confidence: partial" listed every caller it could place, and says what it could not. See How the graph works.
- Callers across services that Niro inferred but could not confirm are listed separately, as "inferred". They are not counted in the risk.
Playbooks
- Change code safely: the size of a planned change (
answer=count), then its callers by name. - Data stores and events: every reader and writer of a table across services, and the publishers and handlers of a topic.
- Add a feature: what exists to copy before you design.