Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Jan 15, 2026

Summary

  • Add 4 new prompt type interfaces to @automaker/types (AppSpecPrompts, ContextDescriptionPrompts, SuggestionsPrompts, TaskExecutionPrompts) with resolved types
  • Add default prompts for all new categories to @automaker/prompts/defaults.ts
  • Add merge functions for new prompt categories in merge.ts
  • Update settings-helpers.ts getPromptCustomization() to return all 12 categories
  • Update server routes to use centralized prompts from settings
  • Add 4 new tabs in prompt customization UI (App Spec, Context, Suggestions, Tasks)
  • Fix Ideation tab layout using grid-cols-4 for even distribution

Test plan

  • Verify new prompt customization tabs appear in Settings > Prompts
  • Verify default prompts are displayed correctly for each category
  • Test customizing a prompt and verify it's used in the relevant feature
  • Verify build passes with npm run build:packages && npm run build:server

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added prompt customization settings for title generation, issue validation, ideation, app specifications, context descriptions, suggestions, and task execution features.
    • Expanded prompt customization UI with new tabs and template prompt sections for enhanced control over AI-generated content.
  • Chores

    • Migrated hardcoded prompts to dynamically configurable settings across multiple features, enabling per-project prompt customization.

✏️ Tip: You can customize this high-level summary in your review settings.

…xt, Suggestions, Tasks

- Add 4 new prompt type interfaces (AppSpecPrompts, ContextDescriptionPrompts,
  SuggestionsPrompts, TaskExecutionPrompts) with resolved types
- Add default prompts for all new categories to @automaker/prompts/defaults.ts
- Add merge functions for new prompt categories in merge.ts
- Update settings-helpers.ts getPromptCustomization() to return all 12 categories
- Update server routes (generate-spec, generate-features-from-spec, describe-file,
  describe-image, generate-suggestions) to use centralized prompts
- Add 4 new tabs in prompt customization UI (App Spec, Context, Suggestions, Tasks)
- Fix Ideation tab layout using grid-cols-4 for even distribution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR introduces centralized prompt customization infrastructure across the application. It adds new prompt type definitions, merge utilities for combining custom and default prompts, and wires SettingsService through route handlers to enable dynamic, user-configurable prompts throughout multiple features including title generation, issue validation, app spec generation, context description, suggestions, and ideation.

Changes

Cohort / File(s) Summary
Type System Extensions
libs/types/src/prompts.ts, libs/types/src/index.ts
Added 14 new prompt-related types: TitleGenerationPrompts, IssueValidationPrompts, IdeationPrompts, AppSpecPrompts, ContextDescriptionPrompts, SuggestionsPrompts, TaskExecutionPrompts and their Resolved* counterparts. Extended PromptCustomization interface with corresponding optional fields.
Prompt Library Defaults
libs/prompts/src/defaults.ts
Exported 30+ new default prompt constants across 7 categories (title generation, issue validation, ideation, app spec, context description, suggestions, task execution), establishing foundational prompt templates.
Prompt Merge Functions
libs/prompts/src/merge.ts
Introduced 7 new merge helper functions (mergeTitleGenerationPrompts, mergeIssueValidationPrompts, etc.) that combine custom prompts with defaults via resolver pattern. Updated mergeAllPrompts to include new categories.
Prompt Library Exports
libs/prompts/src/index.ts
Exposed new defaults, merge functions, and resolved types to public API.
Settings Infrastructure
apps/server/src/lib/settings-helpers.ts
Expanded getPromptCustomization to merge 8 new prompt categories (commitMessage, titleGeneration, issueValidation, ideation, appSpec, contextDescription, suggestions, taskExecution) using corresponding merge functions.
Features Route Handler
apps/server/src/routes/features/index.ts
Added optional SettingsService parameter to createFeaturesRoutes, passed to title handler factory.
Title Generation Handler
apps/server/src/routes/features/routes/generate-title.ts
Updated createGenerateTitleHandler to accept optional SettingsService, fetches titleGeneration.systemPrompt via getPromptCustomization, replaces hardcoded prompt.
App Spec Route Handlers
apps/server/src/routes/app-spec/generate-spec.ts, generate-features-from-spec.ts
Removed dependency on hardcoded prompt functions, integrated getPromptCustomization to dynamically source appSpec.generateSpecSystemPrompt, appSpec.structuredSpecInstructions, and appSpec.generateFeaturesFromSpecPrompt.
Context Description Handlers
apps/server/src/routes/context/routes/describe-file.ts, describe-image.ts
Integrated getPromptCustomization to fetch and use contextDescription.describeFilePrompt and contextDescription.describeImagePrompt instead of static text.
GitHub Issue Validation Handler
apps/server/src/routes/github/routes/validate-issue.ts
Removed hardcoded ISSUE_VALIDATION_SYSTEM_PROMPT import, replaced with dynamic fetch via getPromptCustomization('[ValidateIssue]') returning issueValidation.systemPrompt.
Validation Schema Module
apps/server/src/routes/github/routes/validation-schema.ts
Removed exported ISSUE_VALIDATION_SYSTEM_PROMPT constant (moved responsibility to getPromptCustomization). Retains schema and helper functions.
Suggestions Handler
apps/server/src/routes/suggestions/generate-suggestions.ts
Replaced 4 hardcoded suggestion prompts with dynamic sources: suggestions.featuresPrompt, suggestions.refactoringPrompt, suggestions.securityPrompt, suggestions.performancePrompt, and base template.
Ideation Service
apps/server/src/services/ideation-service.ts
Refactored buildIdeationSystemPrompt and buildSuggestionsSystemPrompt to accept basePrompt parameter from getPromptCustomization, enabling runtime customization instead of hard-coded templates.
Server Entry Point
apps/server/src/index.ts
Updated route initialization to pass settingsService to createFeaturesRoutes.
Settings UI Customization
apps/ui/src/components/views/settings-view/prompts/prompt-customization-section.tsx
Added 7 new tabs (Title Generation, Issue Validation, Ideation, App Spec, Context Description, Suggestions, Task Execution) with corresponding prompt customization fields. Extended existing tabs with Template Prompts sections containing multiple field entries and reset controls.

Sequence Diagram

sequenceDiagram
    participant UI as Settings UI
    participant SS as SettingsService
    participant SH as settings-helpers
    participant PM as Prompt Library
    participant RH as Route Handler

    UI->>SS: Save custom prompts<br/>(titleGeneration, issueValidation, etc.)
    Note over SS: Store customization<br/>by context/category

    RH->>SH: getPromptCustomization(settingsService, '[Context]')
    SH->>SS: Fetch stored customization
    SS-->>SH: Return custom prompts (if any)
    SH->>PM: mergeTitleGenerationPrompts(custom)
    SH->>PM: mergeIssueValidationPrompts(custom)
    SH->>PM: mergeSuggestionsPrompts(custom)<br/>(and others...)
    PM-->>SH: Merged prompts<br/>(custom + defaults)
    SH-->>RH: Resolved prompt object
    RH->>RH: Use customized prompts<br/>in prompt construction
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #354: Introduces IdeationService prompt infrastructure that this PR refactors to support dynamic customization via getPromptCustomization and base prompt parameters.
  • PR #322: Implements similar centralized prompt customization pattern with optional SettingsService wiring into route/handler factories.
  • PR #308: Modifies GitHub issue validation flow (validate-issue.ts) to add prompt customization alongside prior schema/data enhancements.

Suggested labels

enhancement, backend, frontend, settings, prompts

🐰 Whiskers twitch with glee,
Prompts now dance so wild and free,
Customized from every setting's call,
Dynamic magic conquers all!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 73.68% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: centralizing prompts across the system and adding UI for customization of multiple prompt categories (App Spec, Context, Suggestions, Tasks).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the system's prompt customization capabilities by centralizing the management of various AI prompts and introducing a dedicated user interface for their configuration. It allows users to fine-tune prompts for App Specification generation, Context description, Suggestion generation, and Task Execution, moving away from hardcoded prompts to a flexible, user-configurable system. This change improves the adaptability and control users have over the AI's behavior across several core functionalities.

Highlights

  • Prompt Centralization: Introduced new interfaces and default prompts for App Spec, Context Description, Suggestions, and Task Execution, centralizing their management within the system.
  • Customization UI Expansion: Added dedicated tabs in the Settings > Prompts user interface for App Spec, Context, Suggestions, and Tasks, allowing users to customize these new prompt categories directly.
  • Server-Side Integration: Updated server routes to dynamically fetch and utilize these newly centralized and customizable prompts, replacing previously hardcoded prompt logic across various functionalities.
  • UI Layout Improvement: Refined the layout of the prompt customization tabs, specifically adjusting the grid distribution for better presentation and user experience.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and valuable refactoring by centralizing various AI prompts into a customizable system. The changes are well-structured, adding new prompt categories, default values, and a comprehensive UI for customization in the settings. This greatly improves the maintainability and flexibility of the application. The code is clean and consistent across the backend and frontend. I've only found a minor inconsistency in how some types are imported, for which I've provided suggestions to improve code style.

@Shironex Shironex added Enhancement Improvements to existing functionality or UI. Do Not Merge Use this label if something should not be merged. labels Jan 15, 2026
- Fix inline type imports in defaults.ts (move to top-level imports)
- Update ideation-service.ts to use centralized prompts from settings
- Update generate-title.ts to use centralized prompts
- Update validate-issue.ts to use centralized prompts
- Clean up validation-schema.ts (prompts already centralized)
- Minor server index cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Shironex
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant and well-executed refactoring to centralize AI prompts across the application. By moving hardcoded prompts into a dedicated @automaker/prompts package and introducing a comprehensive UI for customization, you've greatly improved the maintainability and flexibility of the system. The changes are consistent and cover many different features, from app spec generation to issue validation and ideation.

I've included a couple of suggestions to further improve the maintainability of the new UI code and the effectiveness of one of the new default prompts. Overall, this is an excellent contribution.

Shironex and others added 4 commits January 15, 2026 20:54
Update auto-mode-service.ts to use centralized Task Execution prompts
from settings, making all 9 task execution prompts customizable via UI:

- buildFeaturePrompt: uses implementationInstructions and
  playwrightVerificationInstructions from settings
- buildTaskPrompt: uses taskPromptTemplate with variable substitution
- buildPipelineStepPrompt: updated to pass prompts through
- executeFeatureWithContext: uses resumeFeatureTemplate
- resolvePlanApproval recovery: uses continuationAfterApprovalTemplate
- Multi-agent continuation: uses continuationAfterApprovalTemplate
- recordLearningsFromFeature: uses learningExtractionSystemPrompt
  and learningExtractionUserPromptTemplate

All 12 prompt categories are now fully customizable from the UI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…} placeholder

- Create PromptTabContent reusable component in prompt-customization-section.tsx
- Update all tabs (Agent, Commit Message, Title Generation, Ideation, App Spec,
  Context Description, Suggestions, Task Execution) to use the new component
- Add {{count}} placeholder to DEFAULT_SUGGESTIONS_SYSTEM_PROMPT for dynamic
  suggestion count

Addresses PR review comments from Gemini.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace repetitive JSX with TAB_CONFIGS array defining all tabs and fields
- Create reusable Banner component for info/warning banners
- Create PromptFieldList component for rendering fields from config
- Support nested sections (like Auto Mode's Template Prompts section)
- Reduce file from ~950 lines to ~810 lines (-15% code)

Benefits:
- Adding new prompt tabs/fields is now declarative (just add to config)
- Consistent structure enforced by TypeScript interfaces
- Much easier to maintain and extend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Split prompt-customization-section.tsx into focused modules:
- types.ts (51 lines) - Type definitions
- tab-configs.ts (448 lines) - Configuration data for all tabs
- components.tsx (159 lines) - Reusable Banner, PromptField, PromptFieldList
- prompt-customization-section.tsx (176 lines) - Main component

Benefits:
- Main component reduced from ~810 to 176 lines
- Clear separation of concerns
- Easier to find and modify specific parts
- Configuration data isolated for easy updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly refactors the prompt management system by centralizing prompt definitions and customization. It introduces new prompt categories for commit messages, title generation, issue validation, ideation, app specifications, context descriptions, suggestions, and task execution. The changes involve updating settings-helpers.ts to import and merge these new prompt types, and modifying various server-side routes and services (e.g., app-spec, context, features, github, suggestions, and auto-mode) to fetch and utilize these customizable prompts via a settingsService instead of relying on hardcoded strings or local constants. The UI components for prompt customization are also updated to reflect these new categories and provide a more structured interface for managing them.

- auto-mode-service-planning.test.ts: Add taskExecutionPrompts argument
  to buildFeaturePrompt calls, update test for implementation instructions
- claude-usage-service.test.ts: Skip deprecated Mac tests (service now
  uses PTY for all platforms), rename Windows tests to PTY tests, update
  to use process.cwd() instead of home directory
- claude-provider.test.ts: Add missing model parameter to environment
  variable passthrough tests

All tests now pass (1093 passed, 23 skipped).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex merged commit 05a3b95 into v0.12.0rc Jan 15, 2026
6 checks passed
@Shironex Shironex deleted the feature/v0.11.0rc-1768426435282-1ogl branch January 15, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge Use this label if something should not be merged. Enhancement Improvements to existing functionality or UI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants