feat(feature-suggestions): implement feature suggestions and spec regeneration functionality

- Introduced a new `FeatureSuggestionsService` to analyze projects and generate feature suggestions based on the project structure and existing features.
- Added IPC handlers for generating and stopping feature suggestions, as well as checking their status.
- Implemented a `SpecRegenerationService` to create and regenerate application specifications based on user-defined project overviews and definitions.
- Enhanced the UI with a `FeatureSuggestionsDialog` for displaying generated suggestions and allowing users to import them into their project.
- Updated the sidebar and board view components to integrate feature suggestions and spec regeneration functionalities, improving project management capabilities.

These changes significantly enhance the application's ability to assist users in feature planning and specification management.
This commit is contained in:
Cody Seibert
2025-12-10 08:51:33 -05:00
parent e9a4dd0319
commit 72cc43d02f
16 changed files with 2923 additions and 187 deletions

View File

@@ -162,22 +162,26 @@ export type AutoModeEvent =
| {
type: "auto_mode_feature_start";
featureId: string;
projectId?: string;
feature: unknown;
}
| {
type: "auto_mode_progress";
featureId: string;
projectId?: string;
content: string;
}
| {
type: "auto_mode_tool";
featureId: string;
projectId?: string;
tool: string;
input: unknown;
}
| {
type: "auto_mode_feature_complete";
featureId: string;
projectId?: string;
passes: boolean;
message: string;
}
@@ -185,18 +189,72 @@ export type AutoModeEvent =
type: "auto_mode_error";
error: string;
featureId?: string;
projectId?: string;
}
| {
type: "auto_mode_complete";
message: string;
projectId?: string;
}
| {
type: "auto_mode_phase";
featureId: string;
projectId?: string;
phase: "planning" | "action" | "verification";
message: string;
};
export type SpecRegenerationEvent =
| {
type: "spec_regeneration_progress";
content: string;
}
| {
type: "spec_regeneration_tool";
tool: string;
input: unknown;
}
| {
type: "spec_regeneration_complete";
message: string;
}
| {
type: "spec_regeneration_error";
error: string;
};
export interface SpecRegenerationAPI {
create: (
projectPath: string,
projectOverview: string,
generateFeatures?: boolean
) => Promise<{
success: boolean;
error?: string;
}>;
generate: (
projectPath: string,
projectDefinition: string
) => Promise<{
success: boolean;
error?: string;
}>;
stop: () => Promise<{
success: boolean;
error?: string;
}>;
status: () => Promise<{
success: boolean;
isRunning?: boolean;
error?: string;
}>;
onEvent: (callback: (event: SpecRegenerationEvent) => void) => () => void;
}
export interface AutoModeAPI {
start: (projectPath: string) => Promise<{
success: boolean;
@@ -316,6 +374,9 @@ export interface ElectronAPI {
// Auto Mode APIs
autoMode: AutoModeAPI;
// Spec Regeneration APIs
specRegeneration: SpecRegenerationAPI;
}
declare global {