state-map
/state-map <scope>, where the scope is the whole application, one use case, or a proposed change (a spec file, a ticket, or text).
The map reads like a real map. Domains are countries, domain concepts are cities, and business flows are roads. Each stop on a road is a state transition, and a gate before a stop shows the trigger it waits for. The field reference is references/schema.md. Read it before writing any JSON.
You judge and the script renders. Your work ends in a source.json, and scripts/build.py turns it into the page with no tokens spent on drawing.
1. Fix the scope
Pick one mode from the request.
- Whole app: every domain, about 25 cities, and every flow that changes state.
- Use case: only the roads that make up the named use case, the cities they pass, and their countries. Cities can be finer-grained here, because the 25-city budget does not apply. Keep the neighbouring road when one of the use case's policies reacts to an event raised on it.
- Proposed change: a use-case map around what the change touches, plus
status: proposedelements for the change itself. Ask for the spec if the request names none.
If the user names an earlier source.json, start from it.
Work in a temporary folder outside the target repo, such as $TMPDIR/state-map/<slug>/. Done when you can state the mode, the target repo path, and the working folder in one line.