/pica-systems-analyst:mapping-states-and-permissions [the domain model and the roles]from pica-systems-analyst
Guides building a state machine and role×action×object permission matrix for a domain model, surfacing missing states and forbidden transitions before implementation.
Ships in pica-systems-analyst. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every state you declare here becomes a screen somebody has to draw. Every one you miss becomes a screen somebody improvises during the build.
1. List the states per entity, as adjectives the business uses. draft, submitted,
approved, settled, reversed. If the business has no word for it, question whether it is
a state or an implementation detail.
2. Draw the transitions as a table, not a diagram. From-state × to-state, with the trigger and the actor. A table has holes you can see; a diagram hides them behind layout.
3. Name the forbidden transitions explicitly. settled → draft is not merely absent, it is
forbidden, and the difference matters: absent means nobody thought about it, forbidden
means somebody decided. Write the forbidden ones down.
4. Build the permission matrix as role × action × object. Every cell gets yes, no, or a condition. An empty cell is an unanswered question, and unanswered defaults to yes during implementation.
5. Write the conditions as rules, not as prose. "Approver ≠ submitter" is a rule the build can enforce and a check can verify. "A different person should approve" is a hope.
6. Check every state is reachable and every state can be left. A state with no way in is dead; a state with no way out is a trap, and it will be discovered by a user.
The transition table has no unexplained holes. Every forbidden transition is labelled as forbidden rather than simply missing. Every permission cell is filled.
Only the happy states. pending, failed, partially-applied and expired are where the
work is.
Permissions as prose. "Managers can approve" leaves out amount limits, delegation, and what happens when the manager is the submitter.
Forgetting the empty state is a state. It is the first screen every new user sees.
node <pica>/roles/systems-analyst/scripts/permissions-check.mjs .pica/state.json
node <pica>/roles/systems-analyst/scripts/process-check.mjs .pica/state.json
both return zero findings.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vqdungwork/pica --plugin pica-systems-analyst2 skills in this plugin
Other plugins' skills for the same job