Agent Skills
› NicholasFlemmer/styx-app
› state-machine-change
state-machine-change
GitHub用于修改核心包中的会话或授权状态机,通过更新状态/事件联合、转换表及测试用例,确保变更的完备性与正确性。
Trigger Scenarios
需要修改状态机的状态、事件、守卫或效果时
需要验证状态机转换逻辑的完整性时
Install
npx skills add NicholasFlemmer/styx-app --skill state-machine-change -g -y
SKILL.md
Frontmatter
{
"name": "state-machine-change",
"description": "Modify the Session or Grant state machine in packages\/core with exhaustive transition tables and tests. Use whenever a state, event, guard, or effect changes.",
"allowed-tools": "Read, Grep, Edit, Write, Bash(pnpm:*)",
"argument-hint": "<session|grant> <change summary>"
}
State machine change: $ARGUMENTS
- Quote the spec §1 rule being implemented (
/spec-lookup 1). - Update the
State/Eventunions and the transition table inpackages/core/src/machines/<name>.ts(object-literal table, not if-chains) so exhaustiveness errors surface missing cells. Invalid pairs returnnull. - Effects are data (
{ type: 'startExpiryTimer', grantId, at }), executed by main. - Tests: table-driven over every (state, event) pair incl. invalid; invariants: needs-you never times out;
alwaysnever expires; one open grant ask per session. - Update the Mermaid diagram in
docs/state-machines.md. - Run
pnpm test -F @styx/core --coverage(100% on machines) and thestate-machine-auditorsubagent.
Version History
- 1d72019 Current 2026-10-18 15:23


