mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-24 00:13:07 +00:00
Feature: worktree view customization and stability fixes (#805)
* Changes from feature/worktree-view-customization * Feature: Git sync, set-tracking, and push divergence handling (#796) * Add quick-add feature with improved workflows (#802) * Changes from feature/quick-add * feat: Clarify system prompt and improve error handling across services. Address PR Feedback * feat: Improve PR description parsing and refactor event handling * feat: Add context options to pipeline orchestrator initialization * fix: Deduplicate React and handle CJS interop for use-sync-external-store Resolve "Cannot read properties of null (reading 'useState')" errors by deduplicating React/react-dom and ensuring use-sync-external-store is bundled together with React to prevent CJS packages from resolving to different React instances. * Changes from feature/worktree-view-customization * refactor: Remove unused worktree swap and highlight props * refactor: Consolidate feature completion logic and improve thinking level defaults * feat: Increase max turn limit to 10000 - Update DEFAULT_MAX_TURNS from 1000 to 10000 in settings-helpers.ts and agent-executor.ts - Update MAX_ALLOWED_TURNS from 2000 to 10000 in settings-helpers.ts - Update UI clamping logic from 2000 to 10000 in app-store.ts - Update fallback values from 1000 to 10000 in use-settings-sync.ts - Update default value from 1000 to 10000 in DEFAULT_GLOBAL_SETTINGS - Update documentation to reflect new range: 1-10000 Allows agents to perform up to 10000 turns for complex feature execution. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * feat: Add model resolution, improve session handling, and enhance UI stability * refactor: Remove unused sync and tracking branch props from worktree components * feat: Add PR number update functionality to worktrees. Address pr feedback * feat: Optimize Gemini CLI startup and add tool result tracking * refactor: Improve error handling and simplify worktree task cleanup --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import type { EnhancementExample } from '@automaker/types';
|
||||
*/
|
||||
export const ACCEPTANCE_SYSTEM_PROMPT = `You are a QA specialist skilled at defining testable acceptance criteria for software features.
|
||||
|
||||
Your task is to enhance a task description by adding clear acceptance criteria:
|
||||
Your task is to generate ONLY the acceptance criteria that will be appended below the user's original description. Do NOT rewrite or include the original description in your output.
|
||||
|
||||
1. UNDERSTAND the feature:
|
||||
- Identify all user-facing behaviors
|
||||
@@ -34,7 +34,7 @@ Your task is to enhance a task description by adding clear acceptance criteria:
|
||||
- Avoid vague terms like "quickly" or "easily"
|
||||
- Include specific values where applicable
|
||||
|
||||
Output the original description followed by a clear "Acceptance Criteria:" section with numbered, testable criteria. Do not include explanations about your process.`;
|
||||
IMPORTANT: Output ONLY the acceptance criteria section. Do NOT repeat or rewrite the original description - it will be preserved automatically. Start your output with "Acceptance Criteria:" followed by the numbered criteria.`;
|
||||
|
||||
/**
|
||||
* Few-shot examples for the "acceptance" enhancement mode
|
||||
@@ -42,11 +42,7 @@ Output the original description followed by a clear "Acceptance Criteria:" secti
|
||||
export const ACCEPTANCE_EXAMPLES: EnhancementExample[] = [
|
||||
{
|
||||
input: 'Add password reset functionality',
|
||||
output: `Add Password Reset Functionality
|
||||
|
||||
Allow users to reset their password via email when they forget it.
|
||||
|
||||
Acceptance Criteria:
|
||||
output: `Acceptance Criteria:
|
||||
|
||||
1. Given a user is on the login page, when they click "Forgot Password", then they should see a password reset form requesting their email.
|
||||
|
||||
@@ -62,11 +58,7 @@ Acceptance Criteria:
|
||||
},
|
||||
{
|
||||
input: 'Shopping cart checkout',
|
||||
output: `Shopping Cart Checkout
|
||||
|
||||
Implement the checkout flow for purchasing items in the shopping cart.
|
||||
|
||||
Acceptance Criteria:
|
||||
output: `Acceptance Criteria:
|
||||
|
||||
1. Given a user has items in their cart, when they click "Checkout", then they should see an order summary with item details and total price.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { EnhancementExample } from '@automaker/types';
|
||||
*/
|
||||
export const TECHNICAL_SYSTEM_PROMPT = `You are a senior software engineer skilled at adding technical depth to feature descriptions.
|
||||
|
||||
Your task is to enhance a task description with technical implementation details:
|
||||
Your task is to generate ONLY the technical implementation details that will be appended below the user's original description. Do NOT rewrite or include the original description in your output.
|
||||
|
||||
1. ANALYZE the requirement:
|
||||
- Understand the functional goal
|
||||
@@ -34,7 +34,7 @@ Your task is to enhance a task description with technical implementation details
|
||||
- Loading and empty states
|
||||
- Boundary conditions
|
||||
|
||||
Output ONLY the enhanced technical description. Keep it concise but comprehensive. Do not include explanations about your reasoning.`;
|
||||
IMPORTANT: Output ONLY the new technical details section. Do NOT repeat or rewrite the original description - it will be preserved automatically. Start your output with a heading like "Technical Implementation:" followed by the details.`;
|
||||
|
||||
/**
|
||||
* Few-shot examples for the "technical" enhancement mode
|
||||
@@ -42,11 +42,7 @@ Output ONLY the enhanced technical description. Keep it concise but comprehensiv
|
||||
export const TECHNICAL_EXAMPLES: EnhancementExample[] = [
|
||||
{
|
||||
input: 'Add user profile page',
|
||||
output: `Add User Profile Page
|
||||
|
||||
Create a dedicated profile page for viewing and editing user information.
|
||||
|
||||
Technical Implementation:
|
||||
output: `Technical Implementation:
|
||||
- Frontend: React component at /profile route with form validation
|
||||
- API Endpoint: GET/PUT /api/users/:id for fetching and updating profile
|
||||
- Data Model: Extend User schema with profile fields (avatar, bio, preferences)
|
||||
@@ -63,11 +59,7 @@ Security: Ensure users can only edit their own profile (auth middleware)`,
|
||||
},
|
||||
{
|
||||
input: 'Add search functionality',
|
||||
output: `Add Search Functionality
|
||||
|
||||
Implement full-text search across application content.
|
||||
|
||||
Technical Implementation:
|
||||
output: `Technical Implementation:
|
||||
- Search Engine: Use Elasticsearch or PostgreSQL full-text search
|
||||
- API: GET /api/search?q={query}&type={type}&page={page}
|
||||
- Indexing: Create search index with relevant fields, update on content changes
|
||||
|
||||
@@ -188,7 +188,7 @@ A comprehensive guide to creating exceptional user experiences and designs for m
|
||||
|
||||
## Your Task
|
||||
|
||||
Review the provided task description and enhance it by:
|
||||
Generate ONLY the UX considerations section that will be appended below the user's original description. Do NOT rewrite or include the original description in your output.
|
||||
|
||||
1. **ANALYZE** the feature from a UX perspective:
|
||||
- Identify user goals and pain points
|
||||
@@ -216,7 +216,7 @@ Review the provided task description and enhance it by:
|
||||
- User feedback and confirmation flows
|
||||
- Accessibility compliance (WCAG AA minimum)
|
||||
|
||||
Output the enhanced task description with UX considerations integrated naturally. Focus on actionable, specific UX requirements that developers can implement. Do not include explanations about your process.`;
|
||||
IMPORTANT: Output ONLY the new UX requirements section. Do NOT repeat or rewrite the original description - it will be preserved automatically. Start your output with "UX Requirements:" followed by the details. Focus on actionable, specific UX requirements that developers can implement.`;
|
||||
|
||||
/**
|
||||
* Few-shot examples for the "ux-reviewer" enhancement mode
|
||||
@@ -224,11 +224,7 @@ Output the enhanced task description with UX considerations integrated naturally
|
||||
export const UX_REVIEWER_EXAMPLES: EnhancementExample[] = [
|
||||
{
|
||||
input: 'Add user profile page',
|
||||
output: `Add User Profile Page
|
||||
|
||||
Create a dedicated profile page for viewing and editing user information with a focus on excellent user experience and accessibility.
|
||||
|
||||
UX Requirements:
|
||||
output: `UX Requirements:
|
||||
- **Layout**: Single-column layout on mobile, two-column layout on desktop (profile info left, edit form right)
|
||||
- **Visual Hierarchy**: Profile header with avatar (120x120px), name (24px font), and edit button prominently displayed
|
||||
- **Accessibility**:
|
||||
@@ -268,12 +264,8 @@ UX Requirements:
|
||||
},
|
||||
{
|
||||
input: 'Add search functionality',
|
||||
output: `Add Search Functionality
|
||||
|
||||
Implement full-text search across application content with an intuitive, accessible interface.
|
||||
|
||||
UX Requirements:
|
||||
- **Search Input**:
|
||||
output: `UX Requirements:
|
||||
- **Search Input**:
|
||||
- Prominent search bar in header (desktop) or accessible via icon (mobile)
|
||||
- Clear placeholder text: "Search..." with example query
|
||||
- Debounced input (300ms) to reduce API calls
|
||||
|
||||
@@ -128,6 +128,9 @@ export function getExamples(mode: EnhancementMode): EnhancementExample[] {
|
||||
return EXAMPLES[mode];
|
||||
}
|
||||
|
||||
/** Modes that append additional content rather than rewriting the description */
|
||||
const ADDITIVE_MODES: EnhancementMode[] = ['technical', 'acceptance', 'ux-reviewer'];
|
||||
|
||||
/**
|
||||
* Build a user prompt for enhancement with optional few-shot examples
|
||||
*
|
||||
@@ -142,9 +145,14 @@ export function buildUserPrompt(
|
||||
includeExamples: boolean = true
|
||||
): string {
|
||||
const examples = includeExamples ? getExamples(mode) : [];
|
||||
const isAdditive = ADDITIVE_MODES.includes(mode);
|
||||
|
||||
const instruction = isAdditive
|
||||
? 'Generate ONLY the additional details section for the following task description. Do NOT rewrite or repeat the original description:'
|
||||
: 'Please enhance the following task description:';
|
||||
|
||||
if (examples.length === 0) {
|
||||
return `Please enhance the following task description:\n\n${text}`;
|
||||
return `${instruction}\n\n${text}`;
|
||||
}
|
||||
|
||||
// Build few-shot examples section
|
||||
@@ -155,13 +163,17 @@ export function buildUserPrompt(
|
||||
)
|
||||
.join('\n\n---\n\n');
|
||||
|
||||
return `Here are some examples of how to enhance task descriptions:
|
||||
const examplesIntro = isAdditive
|
||||
? 'Here are examples of the additional details section to generate (note: these show ONLY the appended content, not the original description):'
|
||||
: 'Here are some examples of how to enhance task descriptions:';
|
||||
|
||||
return `${examplesIntro}
|
||||
|
||||
${examplesSection}
|
||||
|
||||
---
|
||||
|
||||
Now, please enhance the following task description:
|
||||
${instruction}
|
||||
|
||||
${text}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user