Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

extend-signal-schema

БесплатноБез исполняемых скриптовНе проверен

Safely extend or refine AFI signal schemas and closely-related validators in afi-core, while preserving determinism, respecting PoI/PoInsight design, and…

aiskillstoreот aiskillstore★ 509 звёзд на GitHub

Об этом скилле

Skill: extend-signal-schema (afi-core)

Purpose

Use this skill when you need to extend or refine signal schemas in afi-core, adding new fields or validation rules to the Raw, Enriched, Analyzed, or Scored signal schemas.

This skill ensures changes are:

  • Safe: Backwards compatible where possible, with clear migration paths
  • Governed: Aligned with AFI Droid Charter, AFI Droid Playbook, and afi-core/AGENTS.md
  • Correct: PoI/PoInsight remain validator-level traits, NOT signal fields
  • Tested: Schema changes include minimal test coverage

This skill is primarily used by schema-validator-droid and any future afi-core droids that work on signal schemas and validators.


Preconditions

Before changing anything, you MUST:

  1. Read:

    • afi-core/AGENTS.md
    • AFI Droid Charter
    • AFI Droid Playbook
    • Target schema file(s) in schemas/
  2. Confirm:

    • The requested change belongs in afi-core (signal language/validation), not in afi-reactor (orchestration) or afi-token (economics).
    • The change does not introduce PoI/PoInsight as signal fields.
    • The change does not require editing smart contracts, Eliza configs, or deployment/infra repos.

If any requirement is unclear or appears to violate AGENTS.md or Charter, STOP and ask for human clarification instead of trying to be clever.


Inputs Expected

The caller should provide, in natural language or structured form:

  • Target lifecycle stage: Raw, Enriched, Analyzed, or Scored
  • Field name(s): The field(s) to add or refine
  • Type/shape: e.g., string, number, enum, object, array
  • Optionality: Required or optional? If optional, what's the default?
  • Description: Brief explanation of field meaning and usage
  • Backwards compatibility: Any migration concerns or breaking changes?

If any of this information is missing, ask clarifying questions or produce a minimal, clearly-labeled stub with TODOs and conservative defaults.


Step-by-Step Instructions

When this skill is invoked, follow this sequence:

1. Restate the requested change

In your own words, summarize:

  • Which lifecycle stage (Raw/Enriched/Analyzed/Scored) is being modified
  • Which field(s) are being added or changed
  • The type, optionality, and purpose of each field
  • Any backwards compatibility or migration concerns

This summary should be short and precise, so humans can quickly confirm the intent.


2. Locate the schema files

Identify the relevant schema file(s), typically:

  • schemas/universal_signal_schema.ts — Main signal schema (may cover all stages)
  • schemas/pipeline_config_schema.ts — Pipeline configuration schema
  • schemas/signal_finalization_request_schema.ts — Finalization request schema
  • schemas/validator_metadata_schema.ts — Validator metadata schema

Or, if schemas are split by stage:

  • schemas/raw_signal_schema.ts
  • schemas/enriched_signal_schema.ts
  • schemas/analyzed_signal_schema.ts
  • schemas/scored_signal_schema.ts

Do not modify these yet; just understand the current structure.


3. Update the Zod schema

In the target schema file:

  1. Add new fields with appropriate Zod types:

    • Use .optional() for optional fields
    • Use .default(value) for fields with defaults
    • Use .enum([...]) for enumerated values
    • Use .min(), .max(), .regex() for validation rules
  2. Add clear comments explaining:

    • Field purpose and usage
    • When the field is populated (which lifecycle stage)
    • Any constraints or validation rules
  3. Preserve existing fields:

    • Do NOT silently rename or remove existing fields
    • If deprecating a field, mark it clearly and provide migration guidance
  4. Example:

// schemas/universal_signal_schema.ts

export const SignalSchema = z.object({
  // ... existing fields ...

  // ✨ NEW: Macro regime classification (Enriched stage)
  // Values: "risk_on" (bullish sentiment), "risk_off" (defensive), "neutral"
  macro_regime: z.enum(["risk_on", "risk_off", "neutral"]).optional(),

  // ... rest of schema ...
});

4. Update related type exports

If the schema has corresponding TypeScript types:

  1. Export the inferred type:
export type Signal = z.infer<typeof SignalSchema>;
  1. Update any registry interfaces that reference the schema:
    • Check runtime/types.ts or schemas/index.ts
    • Ensure exported types match the updated schema

5. Update validators (if needed)

If the new field requires validation logic:

  1. Locate the relevant validator in validators/:

    • validators/SignalScorer.ts — Signal scoring logic
    • validators/index.ts — Validator registry
  2. Add validation logic if needed:

    • Check for required fields
    • Validate field values against business rules
    • Document any non-deterministic behavior
  3. Keep validators deterministic where possible:

    • Avoid random value
Полный SKILL.md на GitHub

Установить extend-signal-schema в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

skill-report.json

FAQ

Что делает скилл extend-signal-schema?

Safely extend or refine AFI signal schemas and closely-related validators in afi-core, while preserving determinism, respecting PoI/PoInsight design, and obeying the AFI Droid Charter and AFI Core AGENTS.md boundaries.

Как установить скилл extend-signal-schema?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл extend-signal-schema запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить extend-signal-schema с