add-ai-feature-policy

Define a DeckFeatures-based AI feature with policies and registry wiring.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gamajose/MagicTheGathering --skill add-ai-feature-policy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ai-feature-policy
Source: https://github.com/gamajose/MagicTheGathering/tree/main/.claude/skills/add-ai-feature-policy
Command: npx skills add https://github.com/gamajose/MagicTheGathering --skill add-ai-feature-policy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This description explains how to add a new deck-aware AI feature to phase-ai, including its DeckFeatures axis and companion policies (TacticalPolicy plus optional MulliganPolicy), and how to wire it into registries, tests, and plan curves to enable a single-commit ship.

Core Features & Use Cases

  • Defines a new Feature struct with axes, thresholds, and parts-based predicates for live classification via detect() and policy evaluation.
  • Provides wiring guidelines across crates (features/mod.rs, session.rs, policies/mod.rs, registry wiring, and plan/curves) to integrate the feature end-to-end.
  • Includes a comprehensive test plan template and safeguards to avoid CR drift, per-copy name expansion, and activation gating pitfalls.

Quick Start

Provide the feature name and axis details, then implement the feature module and wire it into the policy registry.

Frequently Asked Questions about add-ai-feature-policy

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

FAQPage Schema
How do I add a new AI feature with policy patterns in phase-ai?

Adding an AI feature in phase-ai requires defining a DeckFeatures struct with axes and predicates, wiring it into feature and policy registries, and including comprehensive tests for single-commit shipping.

What is a TacticalPolicy and how does it relate to DeckFeatures?

TacticalPolicy is a companion evaluation rule linked to a DeckFeatures axis, using structural predicates to classify game states and determine activation during session policy evaluation.

How do I prevent CR drift when implementing deck-aware AI features?

Prevent CR drift by grepping rule-numbered CR annotations against docs/MagicCompRules.txt before writing feature code, ensuring comprehensive tests and registry wiring are included in the commit.

Do I need to wire features across multiple crates to ship an AI feature safely?

Shipping an AI feature safely requires wiring across features/mod.rs, session.rs, policies/mod.rs, registry sites, and plan curves to integrate the feature end-to-end in one commit.

When should I use an optional MulliganPolicy alongside a TacticalPolicy?

Use an optional MulliganPolicy alongside a TacticalPolicy when your new DeckFeatures-based AI feature requires specific pre-game mulligan decision logic to be wired into the registry and tested.