@ai_design_agency/sdd-core
v1.1.0
Published
TypeScript types for SDD Platform - shared types for specs, processes, sessions, and API interactions
Downloads
257
Maintainers
Readme
@aida/sdd-core
TypeScript types for the SDD (Spec-Driven Development) Platform.
Installation
npm install @aida/sdd-core
# or
pnpm add @aida/sdd-coreUsage
import type {
Spec,
SpecType,
SpecStatus,
Process,
Session,
CreateSpecRequest,
ApiResponse,
ApiError,
} from "@aida/sdd-core";
// Create a spec
const request: CreateSpecRequest = {
type: "FEA",
title: "Implement user authentication",
content: "# Feature: User Authentication\n...",
};
// Type-safe API responses
const response: ApiResponse<Spec> = await fetch("/api/specs", {
method: "POST",
body: JSON.stringify(request),
}).then((r) => r.json());
console.log(response.data.spec_number); // FEA-202601001Available Types
Entity Types
Spec- Core specification entitySpecType- Spec type prefix ('FEA' | 'ISS' | 'INV' | 'IMP' | 'EPC' | 'BKL')SpecStatus- Lifecycle statusSpecWithScore- Spec with similarity score (from semantic search)Process- Reusable workflow/procedureProcessStep- Individual step within a processSession- Work session on a specSessionStatus- Session lifecycle statusWorkspace- Tenant/organization
API Request Types
CreateSpecRequestUpdateSpecRequestListSpecsQuerySearchSpecsRequestCreateProcessRequestUpdateProcessRequestCreateSessionRequestUpdateSessionRequest
API Response Types
ApiResponse<T>- Standard response wrapperPaginatedResponse<T>- Paginated list responseApiError- Error responseValidationError- Validation error with field detailsErrorCode- Standard error codes
Common Types
UUID- UUID string type aliasISODateString- ISO 8601 date stringBaseEntity- Common entity fields
Spec Types Explained
| Type | Description | Example |
| ----- | ------------------------------ | --------------- |
| FEA | Feature - New functionality | FEA-202601001 |
| ISS | Issue - Bug fix | ISS-202601001 |
| INV | Investigation - Research/spike | INV-202601001 |
| IMP | Improvement - Enhancement | IMP-202601001 |
| EPC | Epic - Large initiative | EPC-202601001 |
| BKL | Backlog - Planned future work | BKL-202601001 |
Spec Status Lifecycle
draft → review → approved → in-progress → testing → completed
↓ ↓
cancelled blockedLicense
MIT
