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★ 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:
Read:
afi-core/AGENTS.md- AFI Droid Charter
- AFI Droid Playbook
- Target schema file(s) in
schemas/
Confirm:
- The requested change belongs in afi-core (signal language/validation),
not in
afi-reactor(orchestration) orafi-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.
- The requested change belongs in afi-core (signal language/validation),
not in
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 schemaschemas/signal_finalization_request_schema.ts— Finalization request schemaschemas/validator_metadata_schema.ts— Validator metadata schema
Or, if schemas are split by stage:
schemas/raw_signal_schema.tsschemas/enriched_signal_schema.tsschemas/analyzed_signal_schema.tsschemas/scored_signal_schema.ts
Do not modify these yet; just understand the current structure.
3. Update the Zod schema
In the target schema file:
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
- Use
Add clear comments explaining:
- Field purpose and usage
- When the field is populated (which lifecycle stage)
- Any constraints or validation rules
Preserve existing fields:
- Do NOT silently rename or remove existing fields
- If deprecating a field, mark it clearly and provide migration guidance
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:
- Export the inferred type:
export type Signal = z.infer<typeof SignalSchema>;
- Update any registry interfaces that reference the schema:
- Check
runtime/types.tsorschemas/index.ts - Ensure exported types match the updated schema
- Check
5. Update validators (if needed)
If the new field requires validation logic:
Locate the relevant validator in
validators/:validators/SignalScorer.ts— Signal scoring logicvalidators/index.ts— Validator registry
Add validation logic if needed:
- Check for required fields
- Validate field values against business rules
- Document any non-deterministic behavior
Keep validators deterministic where possible:
- Avoid random value
Установить extend-signal-schema в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic