Repository navigation
Description
Part of #4639. Parked: last in the epic's build order and optional.
Problem
Workflow and lifecycle state machines are usually documented in a diagram that was accurate once. The
transitions live in code, as a status enum plus the guards that move between its values, and the
diagram stops matching the code almost immediately. No skill derives the diagram from the code.
plugins/architecture/skills/ on main has no map-states.
Evidence
Verified this pass (main a6ba321): the skill does not exist, and no existing issue covers
state-machine extraction.
Inferred: extraction quality depends on how explicit the transitions are. A state-machine library's
transition table can be extracted with high confidence. Status assignments scattered through the code
cannot. The item itself called this the lowest-priority, optional skill in the family.
Proposed approach
/architecture:map-states [entity|workflow]
It extracts:
- states: enum members, smart-enum instances, or a declared state type
- transitions: from a library's transition table, or otherwise from guarded status assignments
- guards and triggers
- initial and terminal states
It draws one entity per diagram, and produces a findings list:
- unreachable states
- dead-end states (reachable, not terminal, with no way out)
- missing guards
- transitions that skip the expected path
Where transitions cannot be extracted reliably, the skill says so and stops.
Before building: confirm a consumer codebase with explicit state machines exists to justify it, and
choose the first library to support.
Files:
- new
plugins/architecture/skills/map-states/{SKILL.md,scripts,evals} plugin.json,CHANGELOG.md,README.md
Acceptance criteria
- Against a fixture using an explicit state-machine library, the diagram matches the declared
transition table. - Unreachable and dead-end states in a fixture are reported.
- A fixture with only ad hoc status assignments produces a low-confidence label or an explicit
refusal, never an unlabeled diagram. - The artifact states its extraction confidence.
Constraints and gotchas
- A plausible state diagram that is subtly wrong is worse than none, because people will trust it.
- Out of scope: runtime state analytics, orchestration across services (map-flow, map-events), and
business-rule extraction in general. - Follow
.claude/rules/skill-bodies-state-current-rules.md, keep the description under 1024
codepoints, and bump the version and add a CHANGELOG entry.
Context
Source: local handoff item 20260907-094206-map-states-skill-proposal.md (retired into this issue).
Parent epic: #4639.
Activity
fix(architecture): make map-states fail closed with computed confiden…
kyle-sexton commentedon Sep 29, 2026
Reopened for an owner decision. This issue was closed as completed by #5158, but its own precondition was never confirmed and the epic had parked it. This comes from the 2026-09-29 audit of the Cursor run.
Decision packet
Question: does
map-statesstay, and in what form?Facts
createMachinegrammar and a StatelessConfigure/Permitgrammar in feat(architecture): land the map-* skills below the landscape #5158.highalthough extraction silently dropped Stateless content (collect-states.sh:293), and that every Stateless terminal state was reported as a dead end, with a test fixture encoding that false positive (collect-states.sh:168).new StateMachine<andcreateMachine(across the 16 local checkouts under~/repos/github.comfound no consumer outside this plugin's own fixtures. That covers local checkouts only, on 2026-09-29.Options
RECOMMENDED (not a decision): D, or B if the owner can name a consumer codebase. Basis: this issue's precondition is unmet, the epic's drop rule applies, and the local search found no consumer.
What #5392 does meanwhile: T17 makes the existing skill fail closed on Stateless features it cannot draw, computes confidence instead of hard-coding it, and marks a terminal state
terminal_inferredinstead ofdead_end. That makes the skill safe while it exists. It does not pre-empt any option, and the skill is not removed.What the decision unblocks: a retirement or trimming PR (D or B), a marker change (C), or closing this issue as accepted (A).
fix(architecture): remediate the map-* family audit findings (#5392)
kyle-sexton commentedon Sep 30, 2026
Owner decision (2026-09-29): Option D. Retire
map-states.Basis given to the owner: this issue's own precondition (a consumer codebase with explicit state machines, and a chosen first library) was never met; epic #4639 parks map-states and says to drop any skill that does not earn its place; a search of the owner's local checkouts found no
createMachine(ornew StateMachine<use outside this plugin's fixtures.Work: one PR that removes
plugins/architecture/skills/map-states/(skill, collector, tests, evals) and every reference to it: the architecture README, the catalog and cheat sheet, marketplace tags, and any sibling skill that routes to it. Bump the architecture plugin version and add a CHANGELOG entry that states the removal. That PR closes this issue.refactor(architecture): retire map-states (#5502)