Complete reference for domain entities, value objects, and enums. All definitions are derived from the TypeSpec source of truth (tsp/). Generated TypeScript types live in packages/core/src/domain/generated/output.ts.
All domain entities extend BaseEntity, which provides identity and timestamp fields.
export type UUID = string;
export type BaseEntity = {
id: UUID;
createdAt: any;
updatedAt: any;
};
export type SoftDeletableEntity = BaseEntity & {
deletedAt?: any;
};
The central aggregate root representing a piece of work progressing through the SDLC lifecycle. Feature encapsulates all related entities (Messages, Plan, Artifacts) and serves as the boundary for transactional consistency.
export type Feature = BaseEntity & {
name: string;
userQuery: string;
slug: string;
description: string;
repositoryPath: string;
branch: string;
lifecycle: SdlcLifecycle;
messages: Message[];
plan?: Plan;
relatedArtifacts: Artifact[];
agentRunId?: string;
specPath?: string;
repositoryId?: UUID;
fast: boolean;
push: boolean;
openPr: boolean;
approvalGates: ApprovalGates;
worktreePath?: string;
pr?: PullRequest;
parentId?: UUID;
attachments?: Attachment[];
};
Implementation plan for a feature containing tasks, artifacts, requirements, and optional scheduling data.
export type Plan = BaseEntity & {
overview: string;
requirements: Requirement[];
artifacts: Artifact[];
tasks: Task[];
state: PlanState;
workPlan?: GanttViewData;
};
Discrete unit of work within a Plan.
export type Task = BaseEntity & {
title?: string;
description?: string;
dependsOn: Task[];
actionItems: ActionItem[];
baseBranch: string;
state: TaskState;
branch: string;
};
Granular, atomic step within a Task.
export type ActionItem = BaseEntity & {
name: string;
description: string;
branch: string;
dependsOn: ActionItem[];
acceptanceCriteria: AcceptanceCriteria[];
};
export type AcceptanceCriteria = BaseEntity & {
description: string;
verified: boolean;
};
Generated document or file attached to a Feature.
export type Artifact = BaseEntity & {
name: string;
type: string;
category: ArtifactCategory;
format: ArtifactFormat;
summary: string;
path: string;
state: ArtifactState;
};
export type Requirement = BaseEntity & {
slug: string;
userQuery: string;
type: RequirementType;
researches: Research[];
};
export type Research = BaseEntity & {
topic: string;
state: ResearchState;
summary: string;
artifacts: Artifact[];
};
export type Message = BaseEntity & {
role: MessageRole;
content: string;
options?: string[];
answer?: string;
selectedOption?: number;
};
Global Shep platform settings stored as a singleton.
export type Settings = BaseEntity & {
models: ModelConfiguration;
user: UserProfile;
environment: EnvironmentConfig;
system: SystemConfig;
agent: AgentConfig;
notifications: NotificationPreferences;
workflow: WorkflowConfig;
featureFlags?: FeatureFlags;
onboardingComplete: boolean;
};
export type Repository = SoftDeletableEntity & {
name: string;
path: string;
};
export type ModelConfiguration = {
default: string; // Default model identifier for all agents
};
export type UserProfile = {
name?: string;
email?: string;
githubUsername?: string;
};
export type EnvironmentConfig = {
defaultEditor: EditorType;
shellPreference: string;
};
export type SystemConfig = {
autoUpdate: boolean;
logLevel: string;
};
export type AgentConfig = {
type: AgentType;
authMethod: AgentAuthMethod;
token?: string;
};
export type ApprovalGates = {
allowPrd: boolean;
allowPlan: boolean;
allowMerge: boolean;
};
export type PullRequest = {
url: string;
number: number;
status: PrStatus;
commitHash?: string;
ciStatus?: CiStatus;
ciFixAttempts?: number;
ciFixHistory?: CiFixRecord[];
};
export type Attachment = {
id: UUID;
name: string;
size: bigint;
mimeType: string;
path: string;
createdAt: any;
};
export type ApprovalGateDefaults = {
allowPrd: boolean;
allowPlan: boolean;
allowMerge: boolean;
pushOnImplementationComplete: boolean;
};
export type WorkflowConfig = {
openPrOnImplementationComplete: boolean;
approvalGateDefaults: ApprovalGateDefaults;
ciMaxFixAttempts?: number;
ciWatchTimeoutMs?: number;
ciLogMaxChars?: number;
};
export type NotificationPreferences = {
inApp: NotificationChannelConfig;
browser: NotificationChannelConfig;
desktop: NotificationChannelConfig;
events: NotificationEventConfig;
};
export type FeatureFlags = {
skills: boolean;
envDeploy: boolean;
debug: boolean;
};
export type GanttViewData = {
tasks: GanttTask[];
startDate: any;
endDate: any;
};
export type GanttTask = {
id: UUID;
name: string;
start: any;
end: any;
dependencies: UUID[];
progress: number;
};
enum SdlcLifecycle {
Started = 'Started',
Analyze = 'Analyze',
Requirements = 'Requirements',
Research = 'Research',
Planning = 'Planning',
Implementation = 'Implementation',
Review = 'Review',
Maintain = 'Maintain',
Blocked = 'Blocked',
}
enum TaskState {
Todo = 'Todo',
WIP = 'Work in Progress',
Done = 'Done',
Review = 'Review',
}
enum PlanState {
Requirements = 'Requirements',
ClarificationRequired = 'ClarificationRequired',
Ready = 'Ready',
}
enum ArtifactCategory {
PRD = 'PRD',
API = 'API',
Design = 'Design',
Other = 'Other',
}
enum ArtifactFormat {
Markdown = 'md',
Text = 'txt',
Yaml = 'yaml',
Other = 'Other',
}
enum ArtifactState {
Todo = 'Todo',
Elaborating = 'Elaborating',
Done = 'Done',
}
enum RequirementType {
Functional = 'Functional',
NonFunctional = 'NonFunctional',
}
enum ResearchState {
NotStarted = 'NotStarted',
Running = 'Running',
Finished = 'Finished',
}
enum MessageRole {
Assistant = 'assistant',
User = 'user',
}
enum AgentType {
ClaudeCode = 'claude-code',
GeminiCli = 'gemini-cli',
Aider = 'aider',
Continue = 'continue',
Cursor = 'cursor',
Dev = 'dev',
}
enum AgentAuthMethod {
Session = 'session',
Token = 'token',
}
enum EditorType {
VsCode = 'vscode',
Cursor = 'cursor',
Windsurf = 'windsurf',
Zed = 'zed',
Antigravity = 'antigravity',
}
enum PrStatus {
Open = 'Open',
Merged = 'Merged',
Closed = 'Closed',
}
enum CiStatus {
Pending = 'Pending',
Success = 'Success',
Failure = 'Failure',
}
enum NotificationEventType {
AgentStarted = 'agent_started',
PhaseCompleted = 'phase_completed',
WaitingApproval = 'waiting_approval',
AgentCompleted = 'agent_completed',
AgentFailed = 'agent_failed',
PrMerged = 'pr_merged',
PrClosed = 'pr_closed',
PrChecksPassed = 'pr_checks_passed',
PrChecksFailed = 'pr_checks_failed',
}
Update when:
tsp/)Source of truth: TypeSpec files in tsp/ directory. Generated TypeScript types in packages/core/src/domain/generated/output.ts.
Related docs: