Skip to content

Commit 5437a5d

Browse files
committed
feat(sdd-core): introduce core project and specification management API
Provides the foundational implementation for the SDD (Spec-Driven Development) workflow, including workspace scaffolding, specification lifecycle management, project validation, and automated status reporting.
1 parent 8084ac2 commit 5437a5d

3 files changed

Lines changed: 617 additions & 0 deletions

File tree

packages/sdd-core/src/index.d.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
export type ScaffoldProfile = "minimal" | "recommended" | "full";
2+
export interface CreateWorkspaceInput {
3+
frameworkRoot: string;
4+
projectName: string;
5+
assistant?: string;
6+
profile?: ScaffoldProfile;
7+
useSpecKit?: boolean;
8+
}
9+
export interface CreateWorkspaceResult {
10+
projectRoot: string;
11+
profile: ScaffoldProfile;
12+
assistant: string;
13+
usedSpecKit: boolean;
14+
}
15+
export interface CreateSpecInput {
16+
projectRoot: string;
17+
featureName: string;
18+
owner?: string;
19+
}
20+
export interface CreateSpecResult {
21+
specId: string;
22+
specDir: string;
23+
indexUpdated: boolean;
24+
}
25+
export interface ValidationMessage {
26+
level: "error" | "warning" | "info";
27+
code: string;
28+
message: string;
29+
path?: string;
30+
}
31+
export interface ValidationResult {
32+
ok: boolean;
33+
errors: number;
34+
warnings: number;
35+
messages: ValidationMessage[];
36+
}
37+
export interface GateResult extends ValidationResult {
38+
approvedSpecs: number;
39+
totalSpecs: number;
40+
}
41+
export interface ConsentResult {
42+
logFile: string;
43+
summary: string;
44+
timestamp: string;
45+
}
46+
export interface FileOutputResult {
47+
path: string;
48+
content: string;
49+
}
50+
export interface SpecSummary {
51+
id: string;
52+
dir: string;
53+
status: string;
54+
}
55+
export declare function getFrameworkRoot(): string;
56+
export declare function slugify(value: string): string;
57+
export declare function createWorkspace(input: CreateWorkspaceInput): Promise<CreateWorkspaceResult>;
58+
export declare function createSpec(input: CreateSpecInput): Promise<CreateSpecResult>;
59+
export declare function listSpecs(projectRoot: string): Promise<SpecSummary[]>;
60+
export declare function validateProject(projectRoot: string): Promise<ValidationResult>;
61+
export declare function checkGate(projectRoot: string): Promise<GateResult>;
62+
export declare function recordUserConsent(projectRoot: string, summary: string): Promise<ConsentResult>;
63+
export declare function generateStatus(projectRoot: string): Promise<FileOutputResult>;
64+
export declare function generateRoadmap(projectRoot: string): Promise<{
65+
mermaidPath: string;
66+
markdownPath: string;
67+
mermaid: string;
68+
markdown: string;
69+
}>;
70+
export declare function appendProjectLogEntry(projectRoot: string, entry: string): Promise<FileOutputResult>;
71+
export declare function writeDailyLog(projectRoot: string, date: string, content: string): Promise<FileOutputResult>;
72+
export declare function writeHandoff(projectRoot: string, fileName: string, content: string): Promise<FileOutputResult>;
73+
export declare function writeDecision(projectRoot: string, fileName: string, content: string): Promise<FileOutputResult>;
74+
export declare function ensureProjectRootAllowed(projectRoot: string): Promise<void>;

0 commit comments

Comments
 (0)