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 = SoftDeletableEntity & {
name: string;
userQuery: string;
slug: string;
description: string;
repositoryPath: string;
branch: string;
lifecycle: SdlcLifecycle;
messages: Message[];
plan?: Plan;
relatedArtifacts: Artifact[];
agentRunId?: string;
injectedSkills?: string[];
specPath?: string;
repositoryId?: UUID;
applicationId?: UUID;
buildMode: BuildMode;
fast: boolean;
push: boolean;
openPr: boolean;
forkAndPr: boolean;
commitSpecs: boolean;
ciWatchEnabled: boolean;
enableEvidence: boolean;
injectSkills: boolean;
commitEvidence: boolean;
approvalGates: ApprovalGates;
worktreePath?: string;
activePlugins?: Record<string, boolean>;
iterationCount?: integer;
maxIterations?: integer;
pr?: PullRequest;
parentId?: UUID;
// Last agent coordination decision with an overlapping feature (spec 141)
coordination?: FeatureCoordination;
previousLifecycle?: SdlcLifecycle;
attachments?: Attachment[];
bedrockEnabled?: boolean;
sourceAgentSessionId?: string;
sourceAgentType?: AgentType;
queuedAt?: any;
};
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;
interactiveAgent?: InteractiveAgentConfig;
fabLayout?: FabLayoutConfig;
supervisor?: SupervisorConfig;
defaultHomePage?: DefaultHomePage;
whatsapp?: WhatsAppConfig;
security?: SecurityConfig;
messaging?: MessagingConfig;
worktree?: WorktreeConfig;
};
Settings is persisted as a single flattened row in SQLite β see ../architecture/settings-service.md.
export type Repository = SoftDeletableEntity & {
name: string;
path: string;
remoteUrl?: string;
isFork?: boolean;
upstreamUrl?: string;
bedrockEnabled?: boolean;
};
export type ModelConfiguration = {
default: string; // Default model identifier for all agents
adaptive?: AdaptiveModelConfig; // Per-task model tier routing (spec 110)
};
Controls per-task model tier selection during implementation. The pinned model
(ModelConfiguration.default, or a per-feature override) is the ceiling β
adaptive selection may degrade below it for simple tasks but never promotes
above it. Absent means disabled.
export type AdaptiveModelConfig = {
enabled: boolean; // Route each task to a model matching its complexity
high?: string; // Explicit model for High-complexity tasks
medium?: string; // Explicit model for Medium-complexity tasks
low?: string; // Explicit model for Low-complexity tasks
};
Unset tier fields are derived from the pinned modelβs family intersected with
the configured agentβs supported-model list β see
packages/core/src/domain/shared/model-tier.ts.
export type UserProfile = {
name?: string;
email?: string;
githubUsername?: string;
preferredLanguage?: Language;
};
export type EnvironmentConfig = {
defaultEditor: EditorType;
shellPreference: string;
terminalPreference: TerminalType;
defaultCloneDirectory?: string;
};
export type SystemConfig = {
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[];
mergeable?: boolean;
upstreamPrUrl?: string;
upstreamPrNumber?: number;
upstreamPrStatus?: PrStatus;
};
The upstream* fields are populated only for the fork-and-PR flow, where the
feature branch lives on a fork and the PR targets the upstream repository.
export type Attachment = {
id: UUID;
name: string;
size: bigint;
mimeType: string;
path: string;
createdAt: any;
notes?: string;
};
export type ApprovalGateDefaults = {
allowPrd: boolean;
allowPlan: boolean;
allowMerge: boolean;
pushOnImplementationComplete: boolean;
};
export type WorkflowConfig = {
openPrOnImplementationComplete: boolean;
approvalGateDefaults: ApprovalGateDefaults;
ciWatchEnabled: boolean;
maxParallelFeatures?: number;
ciMaxFixAttempts?: number;
ciWatchTimeoutMs?: number;
ciLogMaxChars?: number;
ciWatchPollIntervalSeconds?: number;
stageTimeouts?: StageTimeouts;
analyzeRepoTimeouts?: AnalyzeRepoTimeouts;
enableEvidence: boolean;
commitEvidence: boolean;
evidenceRetries?: number;
hideCiStatus?: boolean;
defaultMode: string;
explorationMaxIterations?: number;
autoArchiveDelayMinutes?: number;
skillInjection?: SkillInjectionConfig;
};
export type NotificationPreferences = {
inApp: NotificationChannelConfig;
browser: NotificationChannelConfig;
desktop: NotificationChannelConfig;
events: NotificationEventConfig;
};
export type FeatureFlags = {
envDeploy: boolean;
debug: boolean;
reactFileManager: boolean;
projects: boolean;
codeReview: boolean;
collaboration: boolean;
bedrockIntegration: boolean;
whatsappDispatch: boolean;
aspm: boolean;
clusters: boolean;
scheduledWorkflows: boolean;
githubImport: boolean;
queryAwareHarness: boolean;
// Software-factory areas (spec 135), all on by default
spaces: boolean;
trackers: boolean;
knowledge: boolean;
signals: boolean;
opportunities: boolean;
feedback: boolean;
discovery: boolean;
incidents: boolean;
outcomes: boolean;
docsFirst: boolean;
autopilot: boolean;
factory: boolean;
// The SDLC board (/sdlc), off by default (spec 140)
sdlcBoard: boolean;
// Agent coordination of overlapping features, off by default (spec 141)
agentCoordination: boolean;
};
Several command groups are gated on these flags β for example shep aspm on
aspm, shep supervisor on collaboration, and shep security enforce on
aspm too: supply-chain security is part of ASPM.
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',
Pending = 'Pending',
Exploring = 'Exploring',
Deleting = 'Deleting',
AwaitingUpstream = 'AwaitingUpstream',
Archived = 'Archived',
}
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',
KimiCode = 'kimi-code',
CodexCli = 'codex-cli',
CopilotCli = 'copilot-cli',
GeminiCli = 'gemini-cli',
Cursor = 'cursor',
Cline = 'cline',
OpenRouter = 'openrouter',
TogetherAi = 'together-ai',
Ollama = 'ollama',
LlmProxy = 'llmproxy',
Dev = 'dev',
}
Every member is supported. (The aider and continue placeholders were removed in
spec 135; a settings row still holding either reads back as the default agent.)
Per-agent facts (label, kind, binary, tool id, supported flag,
model list) live in one place β
packages/core/src/domain/shared/agent-catalog.ts, a total
Record<AgentType, AgentDescriptor>, so adding a member here is a compile error
until its catalog row exists.
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',
Indeterminate = 'Indeterminate',
}
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',
PrBlocked = 'pr_blocked',
MergeReviewReady = 'merge_review_ready',
CloudDeploymentUpdated = 'cloud_deployment_updated',
ApplicationUpdated = 'application_updated',
OperationLogAppended = 'operation_log_appended',
AgentQuestionPending = 'agent_question_pending',
AgentQuestionBlocking = 'agent_question_blocking',
AgentMessageBlocked = 'agent_message_blocked',
SupervisorEscalated = 'supervisor_escalated',
SupervisorFailed = 'supervisor_failed',
WorkflowStarted = 'workflow_started',
WorkflowCompleted = 'workflow_completed',
WorkflowFailed = 'workflow_failed',
}
Selects which agent graph runs a feature.
enum BuildMode {
Application = 'application',
Fast = 'fast',
Spec = 'spec',
Exploration = 'exploration',
}
enum TerminalType {
System = 'system',
Warp = 'warp',
ITerm2 = 'iterm2',
Alacritty = 'alacritty',
Kitty = 'kitty',
}
The nine locales shipped under translations/<locale>/.
enum Language {
English = 'en',
Ukrainian = 'uk',
Russian = 'ru',
Portuguese = 'pt',
Spanish = 'es',
Arabic = 'ar',
Hebrew = 'he',
French = 'fr',
German = 'de',
}
enum DefaultHomePage {
ControlCenter = 'control-center',
Applications = 'applications',
Features = 'features',
}
The Application Security Posture Management module adds a unified
security domain anchored on Application. See
../architecture/aspm.md for the module
overview, ports, and ingestion flow.
The existing Application entity gains four optional ASPM context
fields. The previous fields are unchanged.
export type Application = SoftDeletableEntity & {
// β¦existing fieldsβ¦
criticality?: Criticality;
exposure?: Exposure;
dataClassification?: DataClassification;
businessUnit?: string;
};
Unified finding row produced by every ingestion adapter (SARIF v2.1.0,
CycloneDX 1.5+, AI-change graduation). Soft-deletable for audit; dedup
key is (applicationId, findingDomain, ruleId, locationPath, locationLine, cveId).
export type SecurityFinding = SoftDeletableEntity & {
applicationId: UUID;
serviceId?: UUID;
apiAssetId?: UUID;
cloudEnvironmentId?: UUID;
findingDomain: FindingDomain;
ruleId: string;
title: string;
description: string;
locationPath?: string;
locationLine?: number;
scannerRaw?: string;
scannerRawHash?: string;
rawSeverity: string;
canonicalSeverity: CanonicalSeverity;
cveId?: string;
cweId?: string;
owaspAsvsControlId?: string;
ownerId?: UUID;
state: FindingState;
currentRiskScoreId?: UUID;
workItemId?: UUID;
source: string;
discoveredAt: any;
lastSeenAt: any;
firstFixedAt?: any;
};
Append-only history of composite scores. SecurityFinding.currentRiskScoreId
points at the latest row.
export type RiskScore = BaseEntity & {
findingId: UUID;
total: number; // 0-100
breakdown: RiskScoreBreakdown;
computedAt: any;
inputsHash: string;
};
export type Owner = SoftDeletableEntity & {
name: string;
handle?: string;
email?: string;
teamId?: UUID;
};
export type Team = SoftDeletableEntity & { name: string; businessUnitId?: UUID };
export type BusinessUnit = SoftDeletableEntity & { name: string };
Adjacent asset entities covering non-application risk surfaces. Each
links back to an Application.
export type Service = SoftDeletableEntity & { applicationId: UUID; name: string };
export type ApiAsset = SoftDeletableEntity & {
applicationId: UUID;
name: string;
baseUrl?: string;
};
export type CloudEnvironment = SoftDeletableEntity & {
applicationId: UUID;
provider: string;
name: string;
};
Query-shaped campaigns; progress is computed at read time.
export type RemediationCampaign = SoftDeletableEntity & {
name: string;
description: string;
targetQuery: FindingFilter;
status: CampaignStatus;
ownerId?: UUID;
dueDate?: any;
closedAt?: any;
};
Calendar-day SLA windows per canonical severity.
export type SecurityPolicy = SoftDeletableEntity & {
name: string;
active: boolean;
slaCriticalDays: number;
slaHighDays: number;
slaMediumDays: number;
slaLowDays: number;
};
Self-declared with expiry + immutable audit log.
export type RiskException = SoftDeletableEntity & {
findingId: UUID;
reason: ExceptionReason;
justification: string;
declaredBy: string;
declaredAt: any;
expiresAt: any;
status: RiskExceptionStatus;
};
Per-framework rows linkable to findings.
export type ComplianceControl = SoftDeletableEntity & {
frameworkId: ComplianceFramework;
controlId: string;
title: string;
description: string;
};
Dedicated review queue entry for risk introduced by AI-generated
changes. Graduates into a SecurityFinding when confirmed.
export type AiChangeRiskSignal = SoftDeletableEntity & {
applicationId: UUID;
agentSessionId?: string;
signalType: AiSignalType;
severity: CanonicalSeverity;
summary: string;
evidence?: string;
state: AiSignalState;
ownerId?: UUID;
graduatedFindingId?: UUID;
discoveredAt: any;
resolvedAt?: any;
};
FindingFilter β typed filter reused by list / rank / campaign target.RiskScoreBreakdown β per-contribution risk score components.SLAWindow β calendar-day window per canonical severity.CVEReference, OwnershipPath β descriptive value objects.CanonicalSeverity β Critical | High | Medium | Low | Info.FindingDomain β Code | Dependency | Secret | Container | Cloud | Api | Identity | Runtime | Compliance | Ai.FindingState β Open | Triaged | InProgress | Resolved | Closed | Exception.Exposure β Internet | Internal | Airgapped | Unknown.Criticality β Tier1 | Tier2 | Tier3.DataClassification β Public | Internal | Confidential | Restricted.ExceptionReason β FalsePositive | AcceptedRisk | CompensatingControl | NotApplicable | Other.RiskExceptionStatus β Active | Expired | Revoked.CampaignStatus β Draft | Active | Paused | Completed | Cancelled.SlaState β Healthy | AtRisk | Breached.AiSignalType β SecretInDiff | HighRiskDependencyAdded | LargeUnreviewedDiff | LicenseViolation | PromptInjectionShape | Other.AiSignalState β Open | Acknowledged | GraduatedToFinding | Dismissed | Resolved.ComplianceFramework β OwaspAsvs | CweTop25.Update when:
tsp/)Source of truth: TypeSpec files in tsp/ directory. Generated TypeScript types in packages/core/src/domain/generated/output.ts.
Related docs: