Feature Request: Context-aware AI Feature Enhancement
Problem
The "Enhance with AI" functionality in the Kanban board is a pure text transformation tool that operates completely blind to the project context.
When enhancing a feature description, the AI receives ONLY:
- The feature description text
- The enhancement mode (Improve Clarity, Add Technical Details, Simplify, Add Acceptance Criteria)
- Pre-defined few-shot examples
The AI does NOT receive:
- Project structure or existing code
app_spec.txt content (project overview, technology stack, core capabilities)
- Other features in the project (potential duplicates)
- Feature dependencies
- What has already been implemented
Current Behavior
// Current enhance endpoint - no project context
const response = await client.messages.create({
model: selectedModel,
system: systemPrompt, // Generic enhancement instructions
messages: [{
role: "user",
content: userPrompt // Only feature text + few-shot examples
}]
});
Example problem scenario:
- User has project with authentication already implemented
- User adds feature "Add user authentication"
- User clicks "Enhance with AI" → "Add Technical Details"
- AI suggests JWT, sessions, OAuth implementation details
- AI has NO IDEA the project already has auth using BetterAuth
Expected Behavior
AI enhancement should be context-aware:
- Read and understand
app_spec.txt
- Consider the technology stack when suggesting technical details
- Check for similar existing features (warn about duplicates)
- Provide suggestions aligned with project architecture
- Reference actual project dependencies and patterns
Suggested Implementation
Phase 1: Basic Context (Low effort, high impact)
Pass app_spec.txt overview and technology stack to the enhancement prompt:
// In apps/server/src/routes/enhance-prompt/routes/enhance.ts
const appSpecPath = path.join(projectPath, '.automaker', 'app_spec.txt');
const appSpec = await parseAppSpec(appSpecPath);
const context = {
projectName: appSpec.projectName,
overview: appSpec.overview,
techStack: appSpec.technologyStack,
coreCapabilities: appSpec.coreCapabilities.slice(0, 10)
};
// Add to system prompt
const contextualSystemPrompt = `
${systemPrompt}
PROJECT CONTEXT:
- Name: ${context.projectName}
- Overview: ${context.overview}
- Tech Stack: ${context.techStack.join(', ')}
Consider this context when enhancing the feature description.
`;
Phase 2: Feature Awareness
Include existing features to detect potential duplicates:
const existingFeatures = await loadFeatures(projectPath);
const featureTitles = existingFeatures.map(f => f.title);
// Add to prompt
const featureContext = `
EXISTING FEATURES (check for duplicates/conflicts):
${featureTitles.slice(0, 30).join('\n')}
`;
Phase 3: Relevance Validation
Add a validation step that warns users if a feature:
- Might be a duplicate of an existing feature
- Conflicts with implemented features
- Doesn't align with project scope
- Uses technologies not in the stack
// New endpoint or enhancement mode
POST /api/features/validate
{
"featureDescription": "...",
"projectPath": "..."
}
// Returns
{
"isRelevant": true,
"duplicateWarning": "Similar to feature 'user-auth'",
"techStackAlignment": ["Uses React - aligned", "Mentions Vue - not in stack"],
"suggestions": ["Consider using BetterAuth (already in project)"]
}
Files to Modify
| File |
Changes |
apps/server/src/routes/enhance-prompt/routes/enhance.ts |
Add project context loading |
apps/server/src/lib/enhancement-prompts.ts |
Update prompts to use context |
apps/server/src/lib/app-spec-parser.ts |
Create parser for app_spec.txt (new file) |
apps/app/src/components/views/board-view/dialogs/add-feature-dialog.tsx |
Pass projectPath to enhance |
apps/app/src/components/views/board-view/dialogs/edit-feature-dialog.tsx |
Pass projectPath to enhance |
Code References
Current enhance endpoint (no context):
apps/server/src/routes/enhance-prompt/routes/enhance.ts:96-124
Enhancement prompts (generic):
apps/server/src/lib/enhancement-prompts.ts:30-146
Frontend enhance call:
apps/app/src/components/views/board-view/dialogs/add-feature-dialog.tsx:178-203
API Changes
Current:
POST /api/enhance-prompt
{
"originalText": "Add user login",
"enhancementMode": "technical",
"model": "sonnet"
}
Proposed:
POST /api/enhance-prompt
{
"originalText": "Add user login",
"enhancementMode": "technical",
"model": "sonnet",
"projectPath": "/path/to/project" // NEW - enables context
}
Acceptance Criteria
Impact
- User Experience: AI suggestions will be relevant to actual project
- Quality: Reduced duplicate features and conflicting suggestions
- Trust: Users will trust AI more when it shows project awareness
Labels
enhancement, ai, feature-management, high-priority
Feature Request: Context-aware AI Feature Enhancement
Problem
The "Enhance with AI" functionality in the Kanban board is a pure text transformation tool that operates completely blind to the project context.
When enhancing a feature description, the AI receives ONLY:
The AI does NOT receive:
app_spec.txtcontent (project overview, technology stack, core capabilities)Current Behavior
Example problem scenario:
Expected Behavior
AI enhancement should be context-aware:
app_spec.txtSuggested Implementation
Phase 1: Basic Context (Low effort, high impact)
Pass
app_spec.txtoverview and technology stack to the enhancement prompt:Phase 2: Feature Awareness
Include existing features to detect potential duplicates:
Phase 3: Relevance Validation
Add a validation step that warns users if a feature:
Files to Modify
apps/server/src/routes/enhance-prompt/routes/enhance.tsapps/server/src/lib/enhancement-prompts.tsapps/server/src/lib/app-spec-parser.tsapps/app/src/components/views/board-view/dialogs/add-feature-dialog.tsxapps/app/src/components/views/board-view/dialogs/edit-feature-dialog.tsxCode References
Current enhance endpoint (no context):
apps/server/src/routes/enhance-prompt/routes/enhance.ts:96-124Enhancement prompts (generic):
apps/server/src/lib/enhancement-prompts.ts:30-146Frontend enhance call:
apps/app/src/components/views/board-view/dialogs/add-feature-dialog.tsx:178-203API Changes
Current:
Proposed:
Acceptance Criteria
projectPathparameterImpact
Labels
enhancement,ai,feature-management,high-priority