Refactor Shared State
Example at a glance
Map a refactor, make a focused change, then review it.
Refactor · Review. Illustrative workflow, not a recorded run or customer result.
Illustrative workflow
The workflow
A readable example of the seats on this canvas. Statuses in the drawing are illustrative.
Change the parts
The same graph is the product canvas, not an editor embedded in this website. In the app you can change the brief, each agent seat’s role and task, and the terminal command.
Check the result
Proposed check: Run regression tests and inspect import cycles.
This page does not report a historical outcome. Run the project’s own commands in your terminal and read the output yourself.
Try this pattern
Download DNP and rebuild the pattern around your own brief. Related examples stay in the library.
Refactor Shared State
Map a refactor, make a focused change, then review it.
Illustrative scenario: a project has state shared across several modules. Use separate agent seats to explore the dependencies, plan a refactor and review the change.
A starting point, not a recorded run.
Explore the layout, then adapt the roles, tasks and checks to your project.
Example scenario
A shared state layer can make a small change difficult to reason about.
- Trace which modules depend on the shared state
- Keep existing imports and interfaces in view
- Identify the state transitions that need tests
Checks to consider
Choose checks that fit your project before you start.
- Existing imports still work as intended
- Tests cover the state transitions in scope
- The diff matches the brief
One way to divide the work.
Refactor · Review
Map dependencies
Ask Claude Code to inspect the relevant imports and outline the boundaries before making changes.
Make a focused change
Give Codex a small implementation task based on the agreed scope.
Review and verify
Compare the diff with the brief, then run the project’s own checks in your terminal.
Seats in this layout
3 illustrative seats, each with a focused task.
Analyze dependency graph & propose modular slices.
Extract state machine slices & handlers.
Run headless Vitest suite & verify DOM.
- TypeScript (example)
- React (example)
- Project test command