change-spf-behavior

Guides updating, refactoring, splitting, or merging SPF playback-engine behaviors with convention-driven workflows.

931|91|Updated Aug 13, 2025
One-click install
npx skills add https://github.com/videojs/v10 --skill change-spf-behavior
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: change-spf-behavior
Source: https://github.com/videojs/v10/tree/main/.agents/skills/change-spf-behavior
Command: npx skills add https://github.com/videojs/v10 --skill change-spf-behavior

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Changing playback-engine behaviors in the Video.js SPF package without a disciplined process leads to broken ownership boundaries, dropped lifecycle invariants, and refactors that miss the behavior's actual purpose. This Skill routes each change to the correct workflow and enforces purpose-first analysis before any code is written.

Core Features & Use Cases

  • Workflow Routing: Directs the change to one of four detailed references — update (purpose expands), refactor (purpose preserved), split (one responsibility becomes many), or merge (two become one).
  • Convention Enforcement: Applies the documented SPF conventions for signals, reactors, lifecycle, cleanup, naming, and composition from internal/design/spf/conventions/.
  • Test-Pinned Changes: Requires pinning observable behavior with tests before implementation changes, then running scoped SPF test, build, and size checks.
  • Use Case: When asked to split source cleanup out of the playback lifecycle behavior, the Skill produces a documented ownership boundary, pinned invariants, focused implementation changes, and proportional verification.

Quick Start

Ask the assistant to refactor, update, split, or merge a specific SPF behavior file in packages/spf and it will follow the matching workflow.

Frequently Asked Questions about change-spf-behavior

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor an SPF playback behavior in Video.js v10?

Invoke the change-spf-behavior skill with the behavior file path. It articulates the behavior's purpose, lists business rules, runs a gap analysis against SPF conventions, selects a pattern, and pins behavior with tests before changing implementation.

How do I split one SPF behavior into per-type variants?

The split workflow declares the axis (per-type or per-concern), produces cleaned-shape sketches per post-split unit, and runs a cross-boundary constraint audit so implicit ordering invariants in the merged code are preserved or explicitly invalidated.

When should I merge two SPF behaviors instead of keeping them separate?

Merge when both behaviors share the same decision-making domain, such as writing the same slot from the same inputs. The merge workflow requires per-side cleaned-shape sketches and a complexity inventory that declares which side's reactor shape hosts the combination.

What is the difference between updating and refactoring an SPF behavior?

Refactoring preserves the behavior's purpose while improving implementation; updating changes the contract by adding responsibility such as a new slot, lifecycle phase, or constraint. The skill routes purpose-preserved work to refactor.md and purpose-changing work to update.md.

What verification steps run after changing an SPF behavior?

Run the narrow affected tests first, then the package-level checks: pnpm -F @videojs/spf test, pnpm -F @videojs/spf build, and pnpm -F @videojs/spf size, as applicable to the change.