# Plugin Behavior Safe Spec

> <!-- Generated by agnostic-ai -->

- Skill: `phel-lang/plugin-behavior-safe-spec` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add phel-lang/plugin-behavior-safe-spec`
- Raw SKILL.md: https://api.skillmd.com/api/skills/phel-lang/plugin-behavior-safe-spec/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: phel-lang (https://skillmd.com/u/phel-lang)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/phel-lang/plugin-behavior-safe-spec

---

<!-- Generated by agnostic-ai -->

# Plugin Behavior Safety Checklist (Code to Spec)

## Lexer / Parser semantics
- [ ] Token/rule ordering assumptions stated (first-match-wins / longest-match)
- [ ] Malformed / unterminated input handling described (bad-literal, regex fallback)
- [ ] PSI tree shape and key element types identified
- [ ] Source of truth for tokens noted (`PhelTypes` in `src/main/gen/`)

## State transitions
- [ ] Lexer states and their entry/exit conditions listed (e.g. `<REGEX_LITERAL>`)
- [ ] Invalid transitions defined (recover vs `BAD_CHARACTER`)

## IDE runtime
- [ ] Threading model described (read action / EDT / background)
- [ ] Cancellation handled (`ProcessCanceledException` rethrown, not swallowed)
- [ ] Performance considerations for large files noted

## Registration & compatibility
- [ ] Extension points in `plugin.xml` identified
- [ ] Version-compat range respected (2024.2 – 2026.1.x)
- [ ] Generated-source / registry regeneration impact noted

## Observability
- [ ] Logging via platform `Logger` where failures can occur
- [ ] Test coverage (unit + integration) for the behavior identified

