mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
feat: implement ideation feature for brainstorming and idea management
- Introduced a new IdeationService to manage brainstorming sessions, including idea creation, analysis, and conversion to features. - Added RESTful API routes for ideation, including session management, idea CRUD operations, and suggestion generation. - Created UI components for the ideation dashboard, prompt selection, and category grid to enhance user experience. - Integrated keyboard shortcuts and navigation for the ideation feature, improving accessibility and workflow. - Updated state management with Zustand to handle ideation-specific data and actions. - Added necessary types and paths for ideation functionality, ensuring type safety and clarity in the codebase.
This commit is contained in:
@@ -26,6 +26,15 @@ export type EventType =
|
||||
| 'project:analysis-error'
|
||||
| 'suggestions:event'
|
||||
| 'spec-regeneration:event'
|
||||
| 'issue-validation:event';
|
||||
| 'issue-validation:event'
|
||||
| 'ideation:stream'
|
||||
| 'ideation:session-started'
|
||||
| 'ideation:session-ended'
|
||||
| 'ideation:analysis'
|
||||
| 'ideation:analysis-started'
|
||||
| 'ideation:analysis-progress'
|
||||
| 'ideation:analysis-complete'
|
||||
| 'ideation:analysis-error'
|
||||
| 'ideation:suggestions';
|
||||
|
||||
export type EventCallback = (type: EventType, payload: unknown) => void;
|
||||
|
||||
230
libs/types/src/ideation.ts
Normal file
230
libs/types/src/ideation.ts
Normal file
@@ -0,0 +1,230 @@
|
||||
/**
|
||||
* Ideation types for AutoMaker brainstorming and idea management
|
||||
*/
|
||||
|
||||
// ============================================================================
|
||||
// Core Types
|
||||
// ============================================================================
|
||||
|
||||
export type IdeaCategory =
|
||||
| 'feature'
|
||||
| 'ux-ui'
|
||||
| 'dx'
|
||||
| 'growth'
|
||||
| 'technical'
|
||||
| 'security'
|
||||
| 'performance'
|
||||
| 'accessibility'
|
||||
| 'analytics';
|
||||
export type IdeaStatus = 'raw' | 'refined' | 'ready' | 'archived';
|
||||
export type ImpactLevel = 'low' | 'medium' | 'high';
|
||||
export type EffortLevel = 'low' | 'medium' | 'high';
|
||||
|
||||
// ============================================================================
|
||||
// Idea Entity
|
||||
// ============================================================================
|
||||
|
||||
export interface IdeaAttachment {
|
||||
id: string;
|
||||
type: 'image' | 'link' | 'reference';
|
||||
path?: string;
|
||||
url?: string;
|
||||
description?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface Idea {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
category: IdeaCategory;
|
||||
status: IdeaStatus;
|
||||
impact: ImpactLevel;
|
||||
effort: EffortLevel;
|
||||
|
||||
// Conversation context
|
||||
conversationId?: string;
|
||||
sourcePromptId?: string;
|
||||
|
||||
// Content
|
||||
attachments?: IdeaAttachment[];
|
||||
userStories?: string[];
|
||||
notes?: string;
|
||||
|
||||
// Metadata
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
archivedAt?: string;
|
||||
|
||||
// Extensibility
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Ideation Session
|
||||
// ============================================================================
|
||||
|
||||
export type IdeationSessionStatus = 'active' | 'completed' | 'abandoned';
|
||||
|
||||
export interface IdeationSession {
|
||||
id: string;
|
||||
projectPath: string;
|
||||
promptCategory?: IdeaCategory;
|
||||
promptId?: string;
|
||||
status: IdeationSessionStatus;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface IdeationMessage {
|
||||
id: string;
|
||||
role: 'user' | 'assistant';
|
||||
content: string;
|
||||
timestamp: string;
|
||||
savedAsIdeaId?: string;
|
||||
}
|
||||
|
||||
export interface IdeationSessionWithMessages extends IdeationSession {
|
||||
messages: IdeationMessage[];
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Guided Prompts
|
||||
// ============================================================================
|
||||
|
||||
export interface PromptCategory {
|
||||
id: IdeaCategory;
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface IdeationPrompt {
|
||||
id: string;
|
||||
category: IdeaCategory;
|
||||
title: string;
|
||||
description: string;
|
||||
prompt: string;
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Project Analysis
|
||||
// ============================================================================
|
||||
|
||||
export interface AnalysisFileInfo {
|
||||
path: string;
|
||||
type: 'route' | 'component' | 'service' | 'model' | 'config' | 'test' | 'other';
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AnalysisSuggestion {
|
||||
id: string;
|
||||
category: IdeaCategory;
|
||||
title: string;
|
||||
description: string;
|
||||
rationale: string;
|
||||
relatedFiles?: string[];
|
||||
priority: 'high' | 'medium' | 'low';
|
||||
}
|
||||
|
||||
export interface ProjectAnalysisResult {
|
||||
projectPath: string;
|
||||
analyzedAt: string;
|
||||
|
||||
// Structure analysis
|
||||
totalFiles: number;
|
||||
routes: AnalysisFileInfo[];
|
||||
components: AnalysisFileInfo[];
|
||||
services: AnalysisFileInfo[];
|
||||
|
||||
// Tech stack detection
|
||||
framework?: string;
|
||||
language?: string;
|
||||
dependencies?: string[];
|
||||
|
||||
// AI-generated suggestions
|
||||
suggestions: AnalysisSuggestion[];
|
||||
|
||||
// Summary
|
||||
summary: string;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// API Types
|
||||
// ============================================================================
|
||||
|
||||
export interface StartSessionOptions {
|
||||
promptId?: string;
|
||||
promptCategory?: IdeaCategory;
|
||||
initialMessage?: string;
|
||||
}
|
||||
|
||||
export interface SendMessageOptions {
|
||||
imagePaths?: string[];
|
||||
model?: string;
|
||||
}
|
||||
|
||||
export interface CreateIdeaInput {
|
||||
title: string;
|
||||
description: string;
|
||||
category: IdeaCategory;
|
||||
status?: IdeaStatus;
|
||||
impact?: ImpactLevel;
|
||||
effort?: EffortLevel;
|
||||
conversationId?: string;
|
||||
sourcePromptId?: string;
|
||||
userStories?: string[];
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface UpdateIdeaInput {
|
||||
title?: string;
|
||||
description?: string;
|
||||
category?: IdeaCategory;
|
||||
status?: IdeaStatus;
|
||||
impact?: ImpactLevel;
|
||||
effort?: EffortLevel;
|
||||
userStories?: string[];
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface ConvertToFeatureOptions {
|
||||
column?: string;
|
||||
dependencies?: string[];
|
||||
tags?: string[];
|
||||
keepIdea?: boolean;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Event Types
|
||||
// ============================================================================
|
||||
|
||||
export type IdeationEventType =
|
||||
| 'ideation:stream'
|
||||
| 'ideation:session-started'
|
||||
| 'ideation:session-ended'
|
||||
| 'ideation:analysis-started'
|
||||
| 'ideation:analysis-progress'
|
||||
| 'ideation:analysis-complete'
|
||||
| 'ideation:analysis-error';
|
||||
|
||||
export interface IdeationStreamEvent {
|
||||
type: 'ideation:stream';
|
||||
sessionId: string;
|
||||
content: string;
|
||||
done: boolean;
|
||||
}
|
||||
|
||||
export interface IdeationAnalysisEvent {
|
||||
type:
|
||||
| 'ideation:analysis-started'
|
||||
| 'ideation:analysis-progress'
|
||||
| 'ideation:analysis-complete'
|
||||
| 'ideation:analysis-error';
|
||||
projectPath: string;
|
||||
progress?: number;
|
||||
message?: string;
|
||||
result?: ProjectAnalysisResult;
|
||||
error?: string;
|
||||
}
|
||||
@@ -143,3 +143,30 @@ export type {
|
||||
|
||||
// Port configuration
|
||||
export { STATIC_PORT, SERVER_PORT, RESERVED_PORTS } from './ports.js';
|
||||
|
||||
// Ideation types
|
||||
export type {
|
||||
IdeaCategory,
|
||||
IdeaStatus,
|
||||
ImpactLevel,
|
||||
EffortLevel,
|
||||
IdeaAttachment,
|
||||
Idea,
|
||||
IdeationSessionStatus,
|
||||
IdeationSession,
|
||||
IdeationMessage,
|
||||
IdeationSessionWithMessages,
|
||||
PromptCategory,
|
||||
IdeationPrompt,
|
||||
AnalysisFileInfo,
|
||||
AnalysisSuggestion,
|
||||
ProjectAnalysisResult,
|
||||
StartSessionOptions,
|
||||
SendMessageOptions,
|
||||
CreateIdeaInput,
|
||||
UpdateIdeaInput,
|
||||
ConvertToFeatureOptions,
|
||||
IdeationEventType,
|
||||
IdeationStreamEvent,
|
||||
IdeationAnalysisEvent,
|
||||
} from './ideation.js';
|
||||
|
||||
Reference in New Issue
Block a user