Skip to content

Commit 0bab3c9

Browse files
authored
Merge pull request #7 from trailheadapps/rw/publication-updates
fix: updates publication issues for two agents / adding changelog
2 parents 2c141ab + 9d2fa5b commit 0bab3c9

File tree

12 files changed

+135
-321
lines changed

12 files changed

+135
-321
lines changed

.airules/GENERATE_CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Changelog Generation Prompt
2+
3+
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.
4+
5+
## Input Data
6+
7+
You will be provided with a list of git commits. Each entry typically contains a hash, author, date, and the commit message.
8+
9+
## Output Format
10+
11+
Follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) standard.
12+
13+
### Section Header
14+
15+
Create a header for the new changes. If a version number is not provided, use the date.
16+
`## YYYY-MM-DD`
17+
18+
### Categories
19+
20+
Group changes into the following sections:
21+
22+
- `### Added` for new features.
23+
- `### Changed` for changes in existing functionality.
24+
- `### Deprecated` for soon-to-be removed features.
25+
- `### Removed` for now removed features.
26+
- `### Fixed` for any bug fixes.
27+
- `### Security` in case of vulnerabilities.
28+
29+
## Processing Rules
30+
31+
1. **Analyze Commit Messages**: Look for Conventional Commits prefixes:
32+
- `feat`: Map to **Added**.
33+
- `fix`: Map to **Fixed**.
34+
- `docs`: Map to **Changed** (or **Documentation** if many).
35+
- `style`, `refactor`, `perf`: Map to **Changed**.
36+
- `test`, `chore`, `ci`, `build`: Generally **exclude** these unless they constitute a significant user-facing change or developer experience improvement.
37+
2. **Merge Handling**: Ignore standard "Merge pull request" messages unless they contain unique descriptions not covered by individual commits.
38+
3. **Refining Descriptions**:
39+
- Rewrite commit messages to be consumer-friendly.
40+
- Remove technical jargon where possible.
41+
- Combine related commits into a single summary line.
42+
- Capitalize the first letter and end with a period.
43+
4. **Exclusions**:
44+
- Exclude "WIP" (Work In Progress) commits.
45+
- Exclude formatting fixes (unless significant).
46+
47+
## Example
48+
49+
**Input:**
50+
51+
- `feat: added dark mode support`
52+
- `fix: login button alignment issue`
53+
- `chore: update dependencies`
54+
- `docs: update readme`
55+
56+
**Output:**
57+
58+
```markdown
59+
## [Unreleased] - 2023-10-27
60+
61+
### Added
62+
63+
- Dark mode support for better accessibility.
64+
65+
### Changed
66+
67+
- Updated README documentation.
68+
69+
### Fixed
70+
71+
- Corrected alignment issues on the login button.
72+
```

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## 2025-12-09
9+
10+
### Added
11+
12+
- Feature instructions for non-scratch orgs.
13+
14+
### Fixed
15+
16+
- Removed unnecessary flows and updated `actionDescriptionOverrides` action parameters.
17+
- Added `complex_data_type_name` to flow action output.
18+
- Updated flow output to correct type in `actionDefinitions` agent.
19+
- Removed Trailhead Playground references.
20+
- Resolved deployment issue with custom objects.

force-app/main/02_actionConfiguration/actionDefinitions/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ get_forecast:
224224
days: number
225225
description: "Number of days to include in the forecast (1-10)"
226226
outputs:
227-
forecast_data: list[object]
227+
forecast_data: list[string]
228228
description: "List of daily forecast objects containing temperature, conditions, and precipitation data"
229229
target: "flow://GetWeatherForecast"
230230
```
@@ -259,6 +259,16 @@ reasoning:
259259
else:
260260
| - Location: None specified
261261
262+
if @variables.current_temperature > 0:
263+
| - Temperature: {[email protected]_temperature}
264+
else:
265+
| - Temperature: Not fetched
266+
267+
if @variables.conditions:
268+
| - Conditions: {[email protected]}
269+
else:
270+
| - Conditions: Not fetched
271+
262272
| When a user asks about weather:
263273
1. Identify the location they're asking about
264274
2. Use {[email protected]_current_weather} to fetch current conditions

force-app/main/02_actionConfiguration/actionDefinitions/aiAuthoringBundles/ActionDefinitions/ActionDefinitions.agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ topic weather_lookup:
7474
days: number
7575
description: "Number of days to include in the forecast (1-10)"
7676
outputs:
77-
forecast_data: list[object]
77+
forecast_data: list[string]
7878
description: "List of daily forecast objects containing temperature, conditions, and precipitation data"
7979
target: "flow://GetWeatherForecast"
8080

force-app/main/02_actionConfiguration/actionDescriptionOverrides/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Agent: [Calls perform_search with query="API" and complex filters]
304304
### Example: Context-Aware
305305

306306
```text
307-
User: Search for John Smith
307+
User: Search for contact John Smith
308308
309309
[Context: search_context = "accounts"]
310310
Agent sees: search_accounts action available

force-app/main/02_actionConfiguration/actionDescriptionOverrides/aiAuthoringBundles/ActionDescriptionOverrides/ActionDescriptionOverrides.agent

Lines changed: 7 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,12 @@ topic beginner_mode:
4040
inputs:
4141
query: string
4242
description: "Search query text to find relevant knowledge base articles"
43-
filters: object
43+
filters: string
4444
description: "Filter criteria object to refine search results (e.g., type, date range, tags)"
4545
outputs:
46-
results: list[object]
46+
results: list[string]
4747
description: "List of search result objects containing matching knowledge base articles"
4848
target: "flow://PerformSearch"
49-
create_record:
50-
description: "Create a new record"
51-
inputs:
52-
record_type: string
53-
description: "Type of record to create (e.g., Account, Contact, Case, Custom__c)"
54-
data: object
55-
description: "Record data object containing field-value pairs for the new record"
56-
outputs:
57-
record_id: string
58-
description: "Unique identifier of the newly created record"
59-
target: "flow://CreateRecord"
6049

6150
reasoning:
6251
instructions:->
@@ -68,9 +57,6 @@ topic beginner_mode:
6857
simple_search: @actions.perform_search
6958
with query=...
7059
with filters=...
71-
create_new_item: @actions.create_record
72-
with record_type=...
73-
with data=...
7460

7561
switch_to_advanced: @utils.transition to @topic.advanced_mode
7662

@@ -84,34 +70,12 @@ topic advanced_mode:
8470
inputs:
8571
query: string
8672
description: "Search query text with support for advanced syntax and operators"
87-
filters: object
73+
filters: string
8874
description: "Advanced filter criteria object with type, date range, tags, and custom field filters"
8975
outputs:
90-
results: list[object]
76+
results: list[string]
9177
description: "Paginated list of search result objects with relevance scores"
9278
target: "flow://PerformSearch"
93-
create_record:
94-
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."
95-
inputs:
96-
record_type: string
97-
description: "Database record type (Account, Contact, Case, Custom__c, etc.)"
98-
data: object
99-
description: "Record data object with field-value pairs matching the specified record type schema"
100-
outputs:
101-
record_id: string
102-
description: "Unique 18-character Salesforce record ID"
103-
target: "flow://CreateRecord"
104-
generate_report:
105-
description: "Generate analytics report. Available types: sales_summary, user_activity, performance_metrics. Accepts parameters object for date ranges, filters, and aggregation options."
106-
inputs:
107-
report_type: string
108-
description: "Report type (sales_summary, user_activity, performance_metrics, etc.)"
109-
parameters: object
110-
description: "Report parameters object with date ranges, filters, and aggregation options"
111-
outputs:
112-
report_url: string
113-
description: "URL to access or download the generated report"
114-
target: "flow://GenerateReport"
11579

11680
reasoning:
11781
instructions:->
@@ -123,12 +87,6 @@ topic advanced_mode:
12387
advanced_search: @actions.perform_search
12488
with query=...
12589
with filters=...
126-
create_record_advanced: @actions.create_record
127-
with record_type=...
128-
with data=...
129-
generate_analytics: @actions.generate_report
130-
with report_type=...
131-
with parameters=...
13290

13391
switch_to_beginner: @utils.transition to @topic.beginner_mode
13492

@@ -142,34 +100,12 @@ topic contextual_search:
142100
inputs:
143101
query: string
144102
description: "Search query text adapted to the current search context"
145-
filters: object
103+
filters: string
146104
description: "Context-specific filter criteria object"
147105
outputs:
148-
results: list[object]
106+
results: list[string]
149107
description: "List of context-relevant search result objects"
150108
target: "flow://PerformSearch"
151-
create_record:
152-
description: "Create a new record"
153-
inputs:
154-
record_type: string
155-
description: "Type of record to create based on current context"
156-
data: object
157-
description: "Record data object with fields relevant to the current context"
158-
outputs:
159-
record_id: string
160-
description: "Unique identifier of the newly created record"
161-
target: "flow://CreateRecord"
162-
generate_report:
163-
description: "Generate an analytics report"
164-
inputs:
165-
report_type: string
166-
description: "Type of analytics report to generate"
167-
parameters: object
168-
description: "Report parameters object for customization"
169-
outputs:
170-
report_url: string
171-
description: "URL to access the generated report"
172-
target: "flow://GenerateReport"
173109

174110
reasoning:
175111
instructions:->
@@ -179,19 +115,6 @@ topic contextual_search:
179115

180116
actions:
181117
# When searching for accounts
182-
search_accounts: @actions.perform_search
183-
available when @variables.search_context == "accounts"
184-
with query=...
185-
with filters=...
186-
187-
# When searching for contacts
188-
search_contacts: @actions.perform_search
189-
available when @variables.search_context == "contacts"
190-
with query=...
191-
with filters=...
192-
193-
# When searching for cases
194-
search_cases: @actions.perform_search
195-
available when @variables.search_context == "cases"
118+
contextual_search: @actions.perform_search
196119
with query=...
197120
with filters=...

force-app/main/02_actionConfiguration/actionDescriptionOverrides/classes/ActionDescriptionOverridesFlowTest.cls

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,6 @@
44
*/
55
@IsTest
66
private class ActionDescriptionOverridesFlowTest {
7-
@IsTest
8-
static void testCreateRecord() {
9-
// Set input variables for the flow
10-
Map<String, Object> inputs = new Map<String, Object>();
11-
inputs.put('record_type', 'Account');
12-
inputs.put('data', '{"Name":"Test Account"}');
13-
14-
// Run the flow
15-
Test.startTest();
16-
Flow.Interview.CreateRecord flowInterview = new Flow.Interview.CreateRecord(
17-
inputs
18-
);
19-
flowInterview.start();
20-
Test.stopTest();
21-
22-
// Verify the expected outcome
23-
String recordId = (String) flowInterview.getVariableValue('record_id');
24-
Assert.areNotEqual(null, recordId, 'Record ID should be returned');
25-
}
26-
277
@IsTest
288
static void testPerformSearch() {
299
// Set input variables for the flow
@@ -46,34 +26,4 @@ private class ActionDescriptionOverridesFlowTest {
4626
Assert.areNotEqual(null, results, 'Results should be returned');
4727
Assert.areEqual(1, results.size(), 'Should return at least one result');
4828
}
49-
50-
@IsTest
51-
static void testGenerateReport() {
52-
// Set input variables for the flow
53-
Map<String, Object> inputs = new Map<String, Object>();
54-
inputs.put('report_type', 'Sales Report');
55-
inputs.put('include_charts', true);
56-
inputs.put('user_id', UserInfo.getUserId());
57-
inputs.put('format', 'PDF');
58-
inputs.put('start_date', '2024-01-01');
59-
inputs.put('end_date', '2024-12-31');
60-
61-
// Run the flow
62-
Test.startTest();
63-
Flow.Interview.GenerateReport flowInterview = new Flow.Interview.GenerateReport(
64-
inputs
65-
);
66-
flowInterview.start();
67-
Test.stopTest();
68-
69-
// Verify the expected outcome
70-
String reportUrl = (String) flowInterview.getVariableValue(
71-
'report_url'
72-
);
73-
Assert.areNotEqual(null, reportUrl, 'Report URL should be returned');
74-
Assert.isTrue(
75-
reportUrl.startsWith('https://'),
76-
'Report URL should be a valid URL'
77-
);
78-
}
7929
}

0 commit comments

Comments
 (0)