feat: 项目基础设施、类型定义和依赖

This commit is contained in:
2026-06-08 17:08:26 +08:00
parent 880695ed53
commit 0f12e3c100
3 changed files with 68 additions and 1 deletions

51
src/types.ts Normal file
View File

@@ -0,0 +1,51 @@
export interface DocumentConfig {
name: string;
prompt: string;
template?: string;
}
export interface DiscussStage {
prompt: string;
}
export interface PlanStage {
documents: DocumentConfig[];
}
export interface BuildStage {
prompt: string;
}
export interface ArchiveStage {
prompt: string;
}
export interface StagesConfig {
discuss?: DiscussStage;
plan?: PlanStage;
build?: BuildStage;
archive?: ArchiveStage;
}
export interface RuneConfig {
stages: StagesConfig;
}
export interface TaskItem {
checked: boolean;
text: string;
}
export interface ChangeStatus {
name: string;
documents: string[];
taskProgress: { completed: number; total: number } | null;
}
export const STAGES = ["discuss", "plan", "build", "archive"] as const;
export type Stage = (typeof STAGES)[number];
export const RUNE_DIR = ".rune";
export const CONFIG_FILE = "config.yaml";
export const CHANGES_DIR = "changes";
export const ARCHIVE_DIR = "archive";