diff --git a/.airules/GENERATE_CHANGELOG.md b/.airules/GENERATE_CHANGELOG.md new file mode 100644 index 0000000..7b76178 --- /dev/null +++ b/.airules/GENERATE_CHANGELOG.md @@ -0,0 +1,72 @@ +# Changelog Generation Prompt + +You are an expert technical writer and release manager. Your task is to generate or update a `CHANGELOG.md` file based on a list of git commit messages. + +## Input Data + +You will be provided with a list of git commits. Each entry typically contains a hash, author, date, and the commit message. + +## Output Format + +Follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) standard. + +### Section Header + +Create a header for the new changes. If a version number is not provided, use the date. +`## YYYY-MM-DD` + +### Categories + +Group changes into the following sections: + +- `### Added` for new features. +- `### Changed` for changes in existing functionality. +- `### Deprecated` for soon-to-be removed features. +- `### Removed` for now removed features. +- `### Fixed` for any bug fixes. +- `### Security` in case of vulnerabilities. + +## Processing Rules + +1. **Analyze Commit Messages**: Look for Conventional Commits prefixes: + - `feat`: Map to **Added**. + - `fix`: Map to **Fixed**. + - `docs`: Map to **Changed** (or **Documentation** if many). + - `style`, `refactor`, `perf`: Map to **Changed**. + - `test`, `chore`, `ci`, `build`: Generally **exclude** these unless they constitute a significant user-facing change or developer experience improvement. +2. **Merge Handling**: Ignore standard "Merge pull request" messages unless they contain unique descriptions not covered by individual commits. +3. **Refining Descriptions**: + - Rewrite commit messages to be consumer-friendly. + - Remove technical jargon where possible. + - Combine related commits into a single summary line. + - Capitalize the first letter and end with a period. +4. **Exclusions**: + - Exclude "WIP" (Work In Progress) commits. + - Exclude formatting fixes (unless significant). + +## Example + +**Input:** + +- `feat: added dark mode support` +- `fix: login button alignment issue` +- `chore: update dependencies` +- `docs: update readme` + +**Output:** + +```markdown +## [Unreleased] - 2023-10-27 + +### Added + +- Dark mode support for better accessibility. + +### Changed + +- Updated README documentation. + +### Fixed + +- Corrected alignment issues on the login button. +``` diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..23e428b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## 2025-12-09 + +### Added + +- Feature instructions for non-scratch orgs. + +### Fixed + +- Removed unnecessary flows and updated `actionDescriptionOverrides` action parameters. +- Added `complex_data_type_name` to flow action output. +- Updated flow output to correct type in `actionDefinitions` agent. +- Removed Trailhead Playground references. +- Resolved deployment issue with custom objects. diff --git a/force-app/main/02_actionConfiguration/actionDefinitions/README.md b/force-app/main/02_actionConfiguration/actionDefinitions/README.md index 93ca06b..03868d5 100644 --- a/force-app/main/02_actionConfiguration/actionDefinitions/README.md +++ b/force-app/main/02_actionConfiguration/actionDefinitions/README.md @@ -224,7 +224,7 @@ get_forecast: days: number description: "Number of days to include in the forecast (1-10)" outputs: - forecast_data: list[object] + forecast_data: list[string] description: "List of daily forecast objects containing temperature, conditions, and precipitation data" target: "flow://GetWeatherForecast" ``` @@ -259,6 +259,16 @@ reasoning: else: | - Location: None specified + if @variables.current_temperature > 0: + | - Temperature: {!@variables.current_temperature} + else: + | - Temperature: Not fetched + + if @variables.conditions: + | - Conditions: {!@variables.conditions} + else: + | - Conditions: Not fetched + | When a user asks about weather: 1. Identify the location they're asking about 2. Use {!@actions.get_current_weather} to fetch current conditions diff --git a/force-app/main/02_actionConfiguration/actionDefinitions/aiAuthoringBundles/ActionDefinitions/ActionDefinitions.agent b/force-app/main/02_actionConfiguration/actionDefinitions/aiAuthoringBundles/ActionDefinitions/ActionDefinitions.agent index c3bc0dc..c46bfb0 100644 --- a/force-app/main/02_actionConfiguration/actionDefinitions/aiAuthoringBundles/ActionDefinitions/ActionDefinitions.agent +++ b/force-app/main/02_actionConfiguration/actionDefinitions/aiAuthoringBundles/ActionDefinitions/ActionDefinitions.agent @@ -74,7 +74,7 @@ topic weather_lookup: days: number description: "Number of days to include in the forecast (1-10)" outputs: - forecast_data: list[object] + forecast_data: list[string] description: "List of daily forecast objects containing temperature, conditions, and precipitation data" target: "flow://GetWeatherForecast" diff --git a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/README.md b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/README.md index 61ee402..36115bf 100644 --- a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/README.md +++ b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/README.md @@ -304,7 +304,7 @@ Agent: [Calls perform_search with query="API" and complex filters] ### Example: Context-Aware ```text -User: Search for John Smith +User: Search for contact John Smith [Context: search_context = "accounts"] Agent sees: search_accounts action available diff --git a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/aiAuthoringBundles/ActionDescriptionOverrides/ActionDescriptionOverrides.agent b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/aiAuthoringBundles/ActionDescriptionOverrides/ActionDescriptionOverrides.agent index 2a66d31..62cf470 100644 --- a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/aiAuthoringBundles/ActionDescriptionOverrides/ActionDescriptionOverrides.agent +++ b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/aiAuthoringBundles/ActionDescriptionOverrides/ActionDescriptionOverrides.agent @@ -40,23 +40,12 @@ topic beginner_mode: inputs: query: string description: "Search query text to find relevant knowledge base articles" - filters: object + filters: string description: "Filter criteria object to refine search results (e.g., type, date range, tags)" outputs: - results: list[object] + results: list[string] description: "List of search result objects containing matching knowledge base articles" target: "flow://PerformSearch" - create_record: - description: "Create a new record" - inputs: - record_type: string - description: "Type of record to create (e.g., Account, Contact, Case, Custom__c)" - data: object - description: "Record data object containing field-value pairs for the new record" - outputs: - record_id: string - description: "Unique identifier of the newly created record" - target: "flow://CreateRecord" reasoning: instructions:-> @@ -68,9 +57,6 @@ topic beginner_mode: simple_search: @actions.perform_search with query=... with filters=... - create_new_item: @actions.create_record - with record_type=... - with data=... switch_to_advanced: @utils.transition to @topic.advanced_mode @@ -84,34 +70,12 @@ topic advanced_mode: inputs: query: string description: "Search query text with support for advanced syntax and operators" - filters: object + filters: string description: "Advanced filter criteria object with type, date range, tags, and custom field filters" outputs: - results: list[object] + results: list[string] description: "Paginated list of search result objects with relevance scores" target: "flow://PerformSearch" - create_record: - description: "Create new database record. Specify record_type (Account, Contact, Case, Custom__c) and provide data object with field-value pairs. Returns record ID on success." - inputs: - record_type: string - description: "Database record type (Account, Contact, Case, Custom__c, etc.)" - data: object - description: "Record data object with field-value pairs matching the specified record type schema" - outputs: - record_id: string - description: "Unique 18-character Salesforce record ID" - target: "flow://CreateRecord" - generate_report: - description: "Generate analytics report. Available types: sales_summary, user_activity, performance_metrics. Accepts parameters object for date ranges, filters, and aggregation options." - inputs: - report_type: string - description: "Report type (sales_summary, user_activity, performance_metrics, etc.)" - parameters: object - description: "Report parameters object with date ranges, filters, and aggregation options" - outputs: - report_url: string - description: "URL to access or download the generated report" - target: "flow://GenerateReport" reasoning: instructions:-> @@ -123,12 +87,6 @@ topic advanced_mode: advanced_search: @actions.perform_search with query=... with filters=... - create_record_advanced: @actions.create_record - with record_type=... - with data=... - generate_analytics: @actions.generate_report - with report_type=... - with parameters=... switch_to_beginner: @utils.transition to @topic.beginner_mode @@ -142,34 +100,12 @@ topic contextual_search: inputs: query: string description: "Search query text adapted to the current search context" - filters: object + filters: string description: "Context-specific filter criteria object" outputs: - results: list[object] + results: list[string] description: "List of context-relevant search result objects" target: "flow://PerformSearch" - create_record: - description: "Create a new record" - inputs: - record_type: string - description: "Type of record to create based on current context" - data: object - description: "Record data object with fields relevant to the current context" - outputs: - record_id: string - description: "Unique identifier of the newly created record" - target: "flow://CreateRecord" - generate_report: - description: "Generate an analytics report" - inputs: - report_type: string - description: "Type of analytics report to generate" - parameters: object - description: "Report parameters object for customization" - outputs: - report_url: string - description: "URL to access the generated report" - target: "flow://GenerateReport" reasoning: instructions:-> @@ -179,19 +115,6 @@ topic contextual_search: actions: # When searching for accounts - search_accounts: @actions.perform_search - available when @variables.search_context == "accounts" - with query=... - with filters=... - - # When searching for contacts - search_contacts: @actions.perform_search - available when @variables.search_context == "contacts" - with query=... - with filters=... - - # When searching for cases - search_cases: @actions.perform_search - available when @variables.search_context == "cases" + contextual_search: @actions.perform_search with query=... with filters=... diff --git a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls index e75bf43..0ed29d1 100644 --- a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls +++ b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls @@ -4,26 +4,6 @@ */ @IsTest private class ActionDescriptionOverridesFlowTest { - @IsTest - static void testCreateRecord() { - // Set input variables for the flow - Map inputs = new Map(); - inputs.put('record_type', 'Account'); - inputs.put('data', '{"Name":"Test Account"}'); - - // Run the flow - Test.startTest(); - Flow.Interview.CreateRecord flowInterview = new Flow.Interview.CreateRecord( - inputs - ); - flowInterview.start(); - Test.stopTest(); - - // Verify the expected outcome - String recordId = (String) flowInterview.getVariableValue('record_id'); - Assert.areNotEqual(null, recordId, 'Record ID should be returned'); - } - @IsTest static void testPerformSearch() { // Set input variables for the flow @@ -46,34 +26,4 @@ private class ActionDescriptionOverridesFlowTest { Assert.areNotEqual(null, results, 'Results should be returned'); Assert.areEqual(1, results.size(), 'Should return at least one result'); } - - @IsTest - static void testGenerateReport() { - // Set input variables for the flow - Map inputs = new Map(); - inputs.put('report_type', 'Sales Report'); - inputs.put('include_charts', true); - inputs.put('user_id', UserInfo.getUserId()); - inputs.put('format', 'PDF'); - inputs.put('start_date', '2024-01-01'); - inputs.put('end_date', '2024-12-31'); - - // Run the flow - Test.startTest(); - Flow.Interview.GenerateReport flowInterview = new Flow.Interview.GenerateReport( - inputs - ); - flowInterview.start(); - Test.stopTest(); - - // Verify the expected outcome - String reportUrl = (String) flowInterview.getVariableValue( - 'report_url' - ); - Assert.areNotEqual(null, reportUrl, 'Report URL should be returned'); - Assert.isTrue( - reportUrl.startsWith('https://'), - 'Report URL should be a valid URL' - ); - } } diff --git a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/CreateRecord.flow-meta.xml b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/CreateRecord.flow-meta.xml deleted file mode 100644 index 9d61701..0000000 --- a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/CreateRecord.flow-meta.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 65.0 - Default - CreateRecord {!$Flow.CurrentDateTime} - - - BuilderType - - LightningFlowBuilder - - - AutoLaunchedFlow - - 50 - 0 - - Assign_ID - - - Active - - Assign_ID - - 176 - 134 - - record_id - Assign - - 001000000000000AAA - - - - - record_type - String - false - true - false - - - data - String - false - true - false - - - record_id - String - false - false - true - - diff --git a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/GenerateReport.flow-meta.xml b/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/GenerateReport.flow-meta.xml deleted file mode 100644 index b566fe5..0000000 --- a/force-app/main/02_actionConfiguration/actionDescriptionOverrides/flows/GenerateReport.flow-meta.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 65.0 - Default - GenerateReport {!$Flow.CurrentDateTime} - - - BuilderType - - LightningFlowBuilder - - - AutoLaunchedFlow - - 50 - 0 - - Assign_Url - - - Active - - Assign_Url - - 176 - 134 - - report_url - Assign - - https://example.com/report/123 - - - - - report_type - String - false - true - false - - - parameters - String - false - true - false - - - report_url - String - false - false - true - - diff --git a/force-app/main/02_actionConfiguration/advancedInputBindings/aiAuthoringBundles/AdvancedInputBindings/AdvancedInputBindings.agent b/force-app/main/02_actionConfiguration/advancedInputBindings/aiAuthoringBundles/AdvancedInputBindings/AdvancedInputBindings.agent index 6ffc8a9..05d70e6 100644 --- a/force-app/main/02_actionConfiguration/advancedInputBindings/aiAuthoringBundles/AdvancedInputBindings/AdvancedInputBindings.agent +++ b/force-app/main/02_actionConfiguration/advancedInputBindings/aiAuthoringBundles/AdvancedInputBindings/AdvancedInputBindings.agent @@ -60,7 +60,7 @@ topic report_generation: description: "Output format for the report (pdf, csv, excel, or html)" include_charts: boolean description: "Whether to include visual charts and graphs in the report output" - options: object + options: string description: "Additional report configuration options such as filters, groupings, and custom parameters" outputs: report_url: string diff --git a/force-app/main/04_architecturalPatterns/multiTopicNavigation/README.md b/force-app/main/04_architecturalPatterns/multiTopicNavigation/README.md index 69a53bf..637ae70 100644 --- a/force-app/main/04_architecturalPatterns/multiTopicNavigation/README.md +++ b/force-app/main/04_architecturalPatterns/multiTopicNavigation/README.md @@ -75,8 +75,8 @@ Move between topics using `@utils.transition to @topic.name`: ```agentscript reasoning: actions: - proceed_to_booking: @utils.transition to @topic.hotel_booking - description: "Move to booking when user wants to reserve a hotel" + browse_hotels: @utils.transition to @topic.hotel_browse + description: "Browse and search for available hotels" ``` ### Conditional Transition Availability @@ -98,27 +98,11 @@ Transition after an action completes using `transition to`: actions: create_booking: @actions.create_booking with hotel_name=... - with check_in=@variables.check_in_date - with check_out=@variables.check_out_date - set @variables.hotel_name = @inputs.hotel_name - set @variables.booking_id = @outputs.booking_id - set @variables.booking_confirmed = True - # Automatically move to confirmation after booking - transition to @topic.hotel_confirmation -``` - -### Storing Action Inputs - -Capture inputs that the LLM provides: - -```agentscript -actions: - search_hotels: @actions.search_hotels - with location=... with check_in=... with check_out=... - set @variables.check_in_date = @inputs.check_in - set @variables.check_out_date = @inputs.check_out + set @variables.booking_id = @outputs.booking_id + set @variables.booking_confirmed = @outputs.success + transition to @topic.hotel_confirmation ``` ## Key Code Snippets @@ -141,26 +125,22 @@ topic hotel_browse: description: "Check-out date in ISO format (YYYY-MM-DD)" outputs: hotels: list[object] - description: "List of available hotel objects" + description: "List of available hotel objects with name, price, rating, and amenities information" + complex_data_type_name: "lightning__recordInfoType" # This is the name of the complex data type that is used to store the hotel objects target: "flow://SearchHotels" reasoning: instructions:-> - | Help users find the perfect hotel. - - Current search criteria: + | Help users find the perfect hotel using {!@actions.search_hotels}. - if @variables.check_in_date: - | - Check-in: {!@variables.check_in_date} - else: - | - Check-in: Not set + Ensure to ask the user for: + - location + - check-in date + - check-out date - if @variables.check_out_date: - | - Check-out: {!@variables.check_out_date} - else: - | - Check-out: Not set + Do not ask for other booking details. - | When users are ready to book, use the proceed_to_booking action. + If you find available hotels provide the user the hotel information. actions: search_hotels: @actions.search_hotels @@ -168,9 +148,6 @@ topic hotel_browse: with check_in=... with check_out=... transition to @topic.hotel_booking - - proceed_to_booking: @utils.transition to @topic.hotel_booking - description: "Move to booking when user wants to reserve a hotel" ``` ### Complete Topic: Hotel Booking @@ -186,31 +163,19 @@ topic hotel_booking: hotel_name: string description: "Name of the hotel to book" check_in: string - description: "Check-in date" + description: "Check-in date in ISO format (YYYY-MM-DD)" check_out: string - description: "Check-out date" + description: "Check-out date in ISO format (YYYY-MM-DD)" outputs: booking_id: string description: "Unique booking confirmation identifier" success: boolean - description: "Whether the booking was created successfully" + description: "Indicates whether the booking was created successfully" target: "flow://CreateBooking" reasoning: instructions:-> - | Complete the booking for the customer. - - Booking details: - - if @variables.hotel_name: - | - Hotel: {!@variables.hotel_name} - else: - | - Hotel: Not selected - - | - Check-in: {!@variables.check_in_date} - - Check-out: {!@variables.check_out_date} - - | Once booking is complete, transition to hotel_confirmation topic. + | Complete the booking for the customer using {!@actions.create_booking}. actions: create_booking: @actions.create_booking @@ -220,9 +185,6 @@ topic hotel_booking: set @variables.booking_id = @outputs.booking_id set @variables.booking_confirmed = @outputs.success transition to @topic.hotel_confirmation - - go_to_confirmation: @utils.transition to @topic.hotel_confirmation - description: "Move to confirmation after successful booking" ``` ### Complete Topic: Hotel Confirmation @@ -275,7 +237,7 @@ User: I'll take the Bay View Hotel Agent: Excellent choice! Let me help you book the Bay View Hotel. ``` -**[Agent calls proceed_to_booking → transitions to hotel_booking]** +**[Agent calls search_hotels action → transitions to hotel_booking]** ```text Agent: I'm ready to complete your booking at Bay View Hotel. @@ -351,8 +313,8 @@ Good for: Exploratory interfaces, comparison shopping **Good:** ```agentscript -proceed_to_booking: @utils.transition to @topic.hotel_booking - description: "Move to booking when user wants to reserve a hotel" +start_new_booking: @utils.transition to @topic.hotel_browse + description: "Start a new hotel search and booking" ``` **Poor:** @@ -362,18 +324,6 @@ go_next: @utils.transition to @topic.next description: "Go next" ``` -### State Management - -Store state in variables before transitioning: - -```agentscript -actions: - search_hotels: @actions.search_hotels - with check_in=... - set @variables.check_in_date = @inputs.check_in - # State preserved for next topic -``` - ## What's Next - **TopicDelegation**: Learn about delegation (consulting other topics) diff --git a/force-app/main/04_architecturalPatterns/multiTopicNavigation/aiAuthoringBundles/MultiTopicNavigation/MultiTopicNavigation.agent b/force-app/main/04_architecturalPatterns/multiTopicNavigation/aiAuthoringBundles/MultiTopicNavigation/MultiTopicNavigation.agent index 8c1c222..a48cbc3 100644 --- a/force-app/main/04_architecturalPatterns/multiTopicNavigation/aiAuthoringBundles/MultiTopicNavigation/MultiTopicNavigation.agent +++ b/force-app/main/04_architecturalPatterns/multiTopicNavigation/aiAuthoringBundles/MultiTopicNavigation/MultiTopicNavigation.agent @@ -61,6 +61,7 @@ topic hotel_browse: outputs: hotels: list[object] description: "List of available hotel objects with name, price, rating, and amenities information" + complex_data_type_name: "lightning__recordInfoType" # This is the name of the complex data type that is used to store the hotel objects target: "flow://SearchHotels" reasoning: