cycosoft/Eyas / .agents/skills/type-registry-standards
type-registry-standards
VerifiedSingle source of truth guidelines for type definitions, naming conventions, and file organization within the Eyas type registry.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.9 KB |
SKILL.md
View on GitHub---
name: type-registry-standards
description: Single source of truth guidelines for type definitions, naming conventions, and file organization within the Eyas type registry.
tags:
- types
- registry
- architecture
---
# Reusable Skill: Type Registry Standards
## Overview
The type registry is the single source of truth for all data structures in Eyas. It ensures consistency across the core process and the interface.
## When to Use
- Trigger when creating new data models, IPC payloads, or Vue component state definitions.
- Trigger when refactoring existing interfaces in `src/types/`.
## Instructions
### 1. Naming Conventions
- **PascalCase**: All types and interfaces must use PascalCase.
- **Semantic Aliases**: Avoid using raw primitives (`string`, `number`, `boolean`) in business logic. Use semantic aliases from `primitives.ts`.
- *Correct*: `startTime: Timestamp`
- *Incorrect*: `startTime: number`
- **VM Suffix**: ViewModels or state objects used by Vue components should be suffixed with `VM`.
### 2. File Organization
- **Domain-Based**: Group types by domain (e.g., `menu.ts`, `test-server.ts`).
- **Primitives**: Base semantic aliases reside in `primitives.ts`.
- **Component Registry**: Interface-specific structures reside in `components.ts`.
- **Test-Specific Types**: Types used exclusively for testing (e.g., mocks, stubs) must reside in the `tests/types/` directory to ensure complete physical isolation from production definitions.
### 3. Rules & Constraints
- **Registry-First**: Before defining an inline object in a component or function, check if a type already exists in `src/types/`. If not, create it.
- **No Circular Imports**: Types should not import from code files (`.ts` or `.vue`). They should only import from other type files.
- **Alphabetical Sorting**: Properties within interfaces and exports within files should be sorted alphabetically to maintain scannability.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |