build-data
Build complete data orchestrators from spec to commit, including schema setup, operations, controllers, and quality gates. Use when creating new data domains, adding operations to existing orchestrators, or implementing Prisma schemas from Notion.
What this skill does
# Build Data
Orchestrates the complete data orchestrator creation/extension lifecycle from spec to commit. Absorbs schema implementation, operation implementation, controller integration, and the orchestrator TDD pipeline into a unified workflow.
## 1. INTRODUCTION
### Purpose & Context
**Purpose**: Build complete data orchestrators following the `@theriety/data` architecture — from specification through Prisma schema setup, operation implementation, controller integration, testing, quality verification, review, and commit.
**When to use**:
- Creating a new data orchestrator package from scratch
- Adding operations to an existing data orchestrator
- Implementing Prisma schemas from Notion entity definitions
- Implementing data operations from Notion specifications
- Integrating operations into data controllers
**Prerequisites**:
- Domain entities identified with Prisma schema models (or Notion entity definitions)
- `@theriety/data` and `@theriety/core` packages available in the workspace
- Operations specified with verb prefixes (get/list/set/drop/resolve/attach/detach/initiate)
**What this skill does NOT do**:
- Create service packages (use `build-service`)
- Create manifest packages (those are for services)
- Audit existing data layers (use `audit-data`)
### Your Role
You are a **Data Architecture Director** who orchestrates like a database migration planner — ensuring schemas are defined before operations, and operations before tests. You never execute tasks directly, only delegate and coordinate. Your management style emphasizes:
- **Sequential Integrity**: Each phase builds on the previous — schemas before types, types before selectors, selectors before operations
- **Mode Awareness**: Detect new vs extend mode early, skip irrelevant steps
- **Pattern Compliance**: Every operation follows one of 8 verb patterns exactly
- **Verification Gates**: No step proceeds without prior step's validation
## 2. SKILL OVERVIEW
### Skill Input/Output Specification
#### Required Inputs
- **Domain Name**: kebab-case name (e.g., `product`, `vault`) — maps to `@theriety/data-{domain}`
- **Operations List**: Array of operations with verb prefix. Valid verbs: `get`, `list`, `set`, `drop`, `resolve`, `attach`, `detach`, `initiate`
- **Entities List**: Domain entities (e.g., `offering`, `suite`, `tariff`)
#### Optional Inputs
- **--extend flag**: Force extend mode
- **--notion-url**: Notion page with entity/operation specifications
- **Selector Pattern**: `simple` (single `selectors.ts`) or `complex` (co-located `entities/*.ts`)
#### Expected Outputs
- **Data Package**: Complete `@theriety/data-{domain}` at `data/{domain}/`
- **Prisma Schema**: Entity models with relationships and constraints
- **Operations**: Type-safe data operations following verb patterns
- **Controller**: Class with delegating methods for each operation
- **Test Suite**: Unit tests (mocked Prisma) + integration tests (real DB)
- **Verification Report**: typecheck + lint + test results
#### Data Flow Summary
User provides domain specification → Step 1 discovers requirements → Step 2 implements Prisma schema → Step 3 scaffolds project (new mode) → Step 4 builds orchestrator (types, selectors, operations, factory) → Step 5 implements individual operations → Step 6 integrates controller → Step 7 quality gate → Step 8 review → Step 9 commit.
### Visual Overview
```plaintext
YOU SUBAGENTS
(Orchestrates Only) (Perform Tasks)
| |
v v
[START]
|
v
[Step 1: Spec Discovery] -------- (You: parse inputs, detect mode, verify deps)
|
v
[Step 2: Schema Setup] ----------> (Subagents: Notion entities → Prisma schema → generate types)
|
+-- new mode --+
| v
| [Step 3: Project Setup] --> (Sub-skill: coding:setup-project)
| |
+-- extend ----+
|
v
[Step 4: Build Orchestrator] ----> (Sub-skills: coding:draft-code → complete-code → complete-test)
| +- Types + Selectors
| +- Operations
| +- Factory
v
[Step 5: Implement Operations] --> (Subagents: per-operation implementation + tests)
|
v
[Step 6: Implement Controllers] -> (Subagents: controller class integration)
|
v
[Step 7: Quality Gate] ---------> (Sub-skills: coding:fix + coding:lint + coding:refactor)
|
v
[Step 8: Review] ----------------> (Sub-skill: coding:review)
|
v
[Step 9: Commit Gate] -----------> (Sub-skill: coding:commit or coding:handover)
|
v
[END]
Legend:
═══════════════════════════════════════════════════════════════
• Steps 2,5,6: Domain-specific subagents with Theriety patterns
• Steps 3,4,7-9: Coding plugin sub-skills
• Step 1: Orchestrator planning
═══════════════════════════════════════════════════════════════
```
## 3. SKILL IMPLEMENTATION
### Skill Steps
1. Step 1: Spec Discovery
2. Step 2: Schema Setup
3. Step 3: Project Setup (skip if extend mode)
4. Step 4: Build Orchestrator
5. Step 5: Implement Operations
6. Step 6: Implement Controllers
7. Step 7: Quality Gate
8. Step 8: Review
9. Step 9: Commit Gate
---
### Step 1: Spec Discovery
**Step Configuration**:
- **Purpose**: Parse domain specification, detect mode, verify dependencies, determine selector pattern
- **Input**: User's domain specification
- **Output**: Validated requirements + file manifest + mode
- **Sub-skill**: (none)
- **Parallel Execution**: No
#### Phase 1: Planning (You)
1. **Parse inputs**: domain name, operations list (with verb validation), entities list, selector pattern
2. **Detect mode**: Check `ls /Users/alvis/Repositories/core/data/{domain}/`
3. **Verify packages**: `@theriety/data` and `@theriety/core` must exist
4. **Validate operation verbs**: Must start with get/list/set/drop/resolve/attach/detach/initiate
5. **Determine selector pattern**: simple (≤3 entities) or complex (>3 entities)
6. **In extend mode**: read existing factory, operations barrel, package.json
7. **If Notion URL provided**: fetch entity definitions and operation specifications
8. **Produce file manifest** and **TodoWrite** to track all steps
#### Phase 4: Decision (You)
- **PROCEED** if all verified → Step 2
- **STOP** if packages missing or invalid verbs
---
### Step 2: Schema Setup
**Step Configuration**:
- **Purpose**: Implement Prisma schema models from entity definitions (from Notion or user input)
- **Input**: Entity definitions from Step 1
- **Output**: Prisma schema files with generated TypeScript types
- **Sub-skill**: (none — uses domain-specific subagents)
- **Parallel Execution**: No
#### Phase 2: Execution (Subagents)
Spin up **1** comprehensive subagent:
>>>
**ultrathink: adopt the Data Implementation Architect mindset**
- You're a **Data Implementation Architect** with deep expertise in Prisma schema design and TypeScript
<IMPORTANT>
You've to perform the task yourself. You CANNOT further delegate the work to another subagent
</IMPORTANT>
**Read the following assigned standards** and follow them recursively:
- plugin:coding:standard:documentation/write
- plugin:coding:standard:naming/write
- plugin:coding:standard:typescript/write
- standard:data-entity
**Assignment**
Implement Prisma schema for domain: [{domain}] with entities: [{entity list}]
**Steps**
1. If Notion URL provided: fetch entity definitions from Notion (locate Data Controllers database, find controller page, extract entity specs)
2. Validate project structure (prisma/ folder, package.json)
3. Translate each entity into Prisma schema model syntax
4. Write individual schema files with JSDoc documentation for every field
5. Ensure proper relationships, constraints, and indexes
6. Run `npx prisma generate` to create TypeScript types
7. Run `npm run build` to verify no breaking changes
8. Fix any compilation errRelated in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.