aab-prompts 1.0.2__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/PKG-INFO +1 -1
  2. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/aab_prompts.egg-info/PKG-INFO +1 -1
  3. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/aab_service.py +8 -4
  4. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/objects_fields.py +32 -32
  5. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/planner.py +25 -14
  6. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/pyproject.toml +1 -1
  7. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/tests/test_prompts.py +22 -1
  8. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/aab_prompts.egg-info/SOURCES.txt +0 -0
  9. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/aab_prompts.egg-info/dependency_links.txt +0 -0
  10. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/aab_prompts.egg-info/top_level.txt +0 -0
  11. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/__init__.py +0 -0
  12. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/breadcrumbs.py +0 -0
  13. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/constants.py +0 -0
  14. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/expressions.py +0 -0
  15. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/menu_navigations.py +0 -0
  16. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/page_planner.py +0 -0
  17. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/pages.py +0 -0
  18. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/router.py +0 -0
  19. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/solutions_applications.py +0 -0
  20. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/view_filter_planner.py +0 -0
  21. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/view_links_planner.py +0 -0
  22. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/view_planner.py +0 -0
  23. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/prompts/views.py +0 -0
  24. {aab_prompts-1.0.2 → aab_prompts-1.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aab-prompts
3
- Version: 1.0.2
3
+ Version: 1.1.2
4
4
  Summary: AAB Prompts - Application Builder prompt management library
5
5
  Author: AAB Prompts
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aab-prompts
3
- Version: 1.0.2
3
+ Version: 1.1.2
4
4
  Summary: AAB Prompts - Application Builder prompt management library
5
5
  Author: AAB Prompts
6
6
  License: MIT
@@ -191,10 +191,11 @@ class _PagesHandler:
191
191
  class _PlannerHandler:
192
192
  """Handler for all planner-related prompts."""
193
193
 
194
- def __init__(self, restricted_objects_list: list[str], standard_objects_descriptions: str, system_objects_descriptions: str) -> None:
194
+ def __init__(self, restricted_objects_list: list[str], standard_objects_descriptions: str, system_objects_descriptions: str, view_type_details_template: str) -> None:
195
195
  self.restricted_objects_list = restricted_objects_list
196
196
  self.standard_objects_descriptions = standard_objects_descriptions
197
197
  self.system_objects_descriptions = system_objects_descriptions
198
+ self.view_type_details_template = view_type_details_template
198
199
 
199
200
  @property
200
201
  def PLANNER_EXAMPLES(self) -> str:
@@ -207,6 +208,7 @@ class _PlannerHandler:
207
208
  STANDARD_OBJECTS_DESCRIPTIONS=self.standard_objects_descriptions,
208
209
  SYSTEM_OBJECTS_DESCRIPTIONS=self.system_objects_descriptions,
209
210
  PLANNER_EXAMPLES=self.PLANNER_EXAMPLES,
211
+ VIEW_TYPE_DETAILS_TEMPLATE=self.view_type_details_template,
210
212
  )
211
213
 
212
214
 
@@ -340,10 +342,12 @@ class AABPrompts:
340
342
  def __init__(self, core_expressions: dict, restricted_objects_list: list[str], default_solution_id: str, default_application_id: str) -> None:
341
343
  # Initialize handlers
342
344
  self._objects_fields = _ObjectsFieldsHandler(restricted_objects_list)
345
+ self._views = _ViewsHandler()
343
346
  self._planner = _PlannerHandler(
344
347
  restricted_objects_list,
345
348
  self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS,
346
- self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS
349
+ self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS,
350
+ self._views.VIEW_TYPE_DETAILS
347
351
  )
348
352
 
349
353
  # Store all handlers in a list for easy iteration
@@ -358,10 +362,10 @@ class AABPrompts:
358
362
  _RouterHandler(
359
363
  self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS,
360
364
  self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS,
361
- self._planner.PLANNER_EXAMPLES
365
+ self._planner.PLANNER_EXAMPLES,
362
366
  ),
363
367
  _SolutionsApplicationsHandler(default_solution_id, default_application_id),
364
- _ViewsHandler(),
368
+ self._views,
365
369
  ]
366
370
 
367
371
  def __getattr__(self, name: str):
@@ -1,12 +1,12 @@
1
1
 
2
2
 
3
3
  STANDARD_OBJECTS_DESCRIPTIONS_TEMPLATE = """
4
- - Activities (`activities): Tracks activities, like emails, tasks, SMS, and PubSub topics related to a record. This creates logs of all activities on the data stored in the object. When creating a custom object, you should set the `track_activities` column to `1` (`true`) to enable this feature.
4
+ - Activities (`activities`): Tracks activities, like emails, tasks, SMS, and PubSub topics related to a record. This creates logs of all activities on the data stored in the object. When creating a custom object, you should set the `track_activities` column to `1` (`true`) to enable this feature.
5
5
  - Alerts (`alerts`): Alerts are standard objects that are used to create in-app alerts for a user. These alerts can be used to notify users about important events or changes in the system, such as an approval or rejection alert.
6
6
  - Attachments (`attachments`): Attachments are standard objects that are used to track files, images, videos, and other types of attachments related to a record. When creating a custom object, you should set the `track_attachments` column to `1` (`true`) to enable this feature. Attachments are typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file. If you enable this, you do not need a generic attachments file field on the object as these attachments will automatically be tracked as children of the records.
7
7
  - Audit Trails (`audit_trails`): Audit trails track field-level changes for auditability of a record. When creating a custom object, you should set the `track_audit_trails` column to `1` (`true`) to enable this feature. Audit trails are typically used when there is a need to track changes in the data stored in the object for auditability purposes.
8
8
  - Checklist Item (`checklist_items`): Checklist items are a standard object that is used to track items in a checklist.
9
- - Contacts (`contacts`): Standard object that is used to track details about a person. This is often reused to prevent duplicative tables and to ensure that the data is stored in a consistent format. For example, an applicant or a customer can be a contact.
9
+ - Contacts (`contacts`): Standard object that is used to track details about a person. This is often reused to prevent duplicate tables and to ensure that the data is stored in a consistent format. For example, an applicant or a customer can be a contact.
10
10
  - Favorites (`favorites`): Favorites are used to track "favorite" records. You should set the `track_favorites` column to `1` (`true`) to enable this feature. Favorites are typically used when there is a need to track records that are important to users and can be easily accessed from the UI.
11
11
  - Households (`households`): Standard object that is used to track details about a household. It acts as an optional parent for the standard `contacts` object. This is useful when you want to group multiple contacts under a single household.
12
12
  - Jobs (`jobs`): Jobs are a standard object that is used to store details for job requisitions (employment). These are not typically used in most applications, but they can be useful for tracking job postings or other employment-related data.
@@ -16,15 +16,15 @@ STANDARD_OBJECTS_DESCRIPTIONS_TEMPLATE = """
16
16
  """
17
17
 
18
18
  SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
19
- - Accounts (`accounts`): Accounts are system-level objects that store tenant or org-level datails, settings, and configuration preferences for the application environment.
20
- - Actions (`actions`): Actions define operations that can be performed on records, such as sending emails, uupdating fields, or triggering integrations.
19
+ - Accounts (`accounts`): Accounts are system-level objects that store tenant or org-level details, settings, and configuration preferences for the application environment.
20
+ - Actions (`actions`): Actions define operations that can be performed on records, such as sending emails, updating fields, or triggering integrations.
21
21
  - API OAuth Configs (`api_oauth_confits`): API OAuth Configs are system-level objects that store configuration settings for OAuth 2.0 integrations.
22
22
  - API OAuth Credentials (`api_oauth_credentials`): API OAuth Credentials are system-level objects that store credentials for OAuth 2.0 integrations. These are children of API OAuth Configs, and are scoped to a specific user.
23
23
  - Applications (`applications`): Applications are containers that define the distinct apps created within the platform, including their settings and configurations.
24
24
  - Breadcrumbs (`breadcrumbs`): Breadcrumbs are used to define the hierarchical navigation path displayed at the top of pages to help users understand their location within the app.
25
25
  - Conditions (`conditions`): Conditions are logic rules used to filter data or trigger workflows based on field values.
26
26
  - Custom DocAI Parsers (`custom_docai_parsers`): Configuration for custom-trained Document AI models used to extract data from non-standard documents.
27
- - Custom Permissions (`custom_permissions`): Custom Permissions are used to define granular permissiosn that can be assigned to permission sets.
27
+ - Custom Permissions (`custom_permissions`): Custom Permissions are used to define granular permissions that can be assigned to permission sets.
28
28
  - Dashboards (`dashboards`): Dashboards define the configuration for an interface for displaying data in a visual format, such as charts and graphs. Dashboards stored in this object are typically external dashboards that are embedded via URL.
29
29
  - Data Access Roles (`data_access_roles`): Data Access Roles are used to define the hierarchy of permissions and access levels for data within the application.
30
30
  - Data Migrations (`data_migrations`): Data Migrations are used to manage the migration of data from one system to another.
@@ -49,7 +49,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
49
49
  - DocAI Form Parser (`docai_form_parser`): Stores data extracted using the generic form parser for structured documents.
50
50
  - ID Documents (`docai_generic_id`): Stores identity data extracted from generic identification cards.
51
51
  - DocAI Lease Agreement (`docai_lease_agreement`): Stores data extracted from lease agreements.
52
- - Letters (`docai_letter`): Stores unstructured text or specific entities extracted from general corespondence letters.
52
+ - Letters (`docai_letter`): Stores unstructured text or specific entities extracted from general correspondence letters.
53
53
  - Marriage Certificates (`docai_marriage_certificate`): Stores data extracted from marriage certificates.
54
54
  - Mortgage Statements (`docai_mortgage_statement`): Stores financial data extracted from mortgage statements.
55
55
  - New York IDs (`docai_nycid`): Stores identity data extracted specifically from New York City ID cards.
@@ -57,7 +57,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
57
57
  - Pay Slips (`docai_paystub`): Stores payroll data extracted from employee paystubs.
58
58
  - DocAI Property Tax Statement (`docai_property_tax_statement`): Stores financial data extracted from property tax statements.
59
59
  - REC IDs (`docai_rec_id`): Stores data extracted from recreational or specialized ID cards.
60
- - US Driver Licenses (`docai_us_driver_license`): Stores identity and license data extrated from US driver's licenses.
60
+ - US Driver Licenses (`docai_us_driver_license`): Stores identity and license data extracted from US driver's licenses.
61
61
  - US Passports (`docai_us_passport`): Stores data extracted from US passports.
62
62
  - Utility Documents (`docai_utility_doc`): Stores billing and usage data extracted from utility bills.
63
63
  - Form W-2 (`docai_w2`): Stores data extracted from IRS Form W-2 tax documents.
@@ -68,7 +68,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
68
68
  - Format Rules (`format_rules`): Format Rules define conditional formatting (colors, icons) applied to fields in views based on conditions.
69
69
  - Groundings (`groundings`): Groundings define the configuration for AI context, linking data sources to Virtual Agents
70
70
  - Integrations (`integrations`): Integrations are used to configure the connection to an external webhook or API endpoint
71
- - KB Sections (`kb_sections`): KB Sections definte categories and sub-categories used to organize Knowledge Base articles.
71
+ - KB Sections (`kb_sections`): KB Sections define categories and sub-categories used to organize Knowledge Base articles.
72
72
  - Knowledge Bases (`knowledge_bases`): Knowledge Bases are used as containers to organize and store articles, FAQs, and other documentation.
73
73
  - Matching Rules (`matching_rules`): Matching Rules define the criteria used to determine if two records are considered duplicates.
74
74
  - Menus (`menus`): Menus define the navigation structure for the app's UI.
@@ -76,10 +76,10 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
76
76
  - Objects (`objects`): Objects are the database tables that store data in the platform.
77
77
  - Object Access (`objects_access`): Object Access defines the access control lists and sharing settings for each object.
78
78
  - Package Components (`package_components`): Package Components define the individual metadata items (fields, views, objects, workflows, etc.) that are included in a package.
79
- - Packages (`packages`): Packages are bundles of application metadat created for distribution or deployment.
79
+ - Packages (`packages`): Packages are bundles of application metadata created for distribution or deployment.
80
80
  - Pages (`pages`): Pages define the layout and structure of UI screens in the application. Pages are custom UI screens that support functionality beyond the standard object views.
81
81
  - Permission Set Applications (`permission_set_applications`): Permission Set Applications control access to specific applications within a permission set.
82
- - Permission Set Custom Permissiosn (`permission_set_custom_permissions`): Permission Set Custom Permissions control access to specific custom permissions within a permission set.
82
+ - Permission Set Custom Permissions (`permission_set_custom_permissions`): Permission Set Custom Permissions control access to specific custom permissions within a permission set.
83
83
  - Permission Set Fields (`permission_set_fields`): Permission Set Fields control read/write access to specific fields within a permission set.
84
84
  - Permission Set Knowledgebases (`permission_set_knowledgebases`): Permission Set Knowledgebases control access to specific knowledge bases within a permission set.
85
85
  - Permission Set Tables (`permission_set_tables`): Permission Set Tables control CRUD (create, read, update, delete) access to objects within a permission set.
@@ -105,9 +105,9 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
105
105
  - Uploads (`uploads`): Uploads store logs and metadata regarding files uploaded to the platform.
106
106
  - Users (`users`): Users are system-level objects that store user information, including their profile, roles, permissions, and settings.
107
107
  - Users Shares (`users__shares`): Manages sharing permissions specifically for the users table.
108
- - Versions (`versions`): Versions track the history of changes for version controlled system objects.
108
+ - Versions (`versions`): Versions track the history of changes for version-controlled system objects.
109
109
  - View Links (`view_links`): View Links define the actions, buttons, or hyperlinks embedded within a view.
110
- - View Views (`view_views`): View Views represent nexted views or components within a parent view.
110
+ - View Views (`view_views`): View Views represent nested views or components within a parent view.
111
111
  - Views (`views`): Views define how data is presented to the user (grid/list, forms, etc)
112
112
  - Virtual Agents (`virtual_agents`): Virtual Agents are used to define and manage conversational or automated AI agents within the platform.
113
113
  - Walkthrough Steps (`walkthrough_steps`): Walkthrough Steps are used to define the steps in a guided tour or walkthrough for new users.
@@ -166,31 +166,31 @@ You must always have the Objects in this specific schema. Each Object must follo
166
166
  For each key, read and follow its meaning and usage rules:
167
167
 
168
168
  - table: The internal table name. Always named in lowercase_snake_case, plural. Must match the object's concept exactly. Max 100 characters.
169
- - singular_label: The singular label of the object. Always named in singular. Max 256 characters.
170
- - plural_label: The plural label of the object. Always named in plural. Max 256 characters.
169
+ - singular_label: The singular label of the object. Always named in the singular in title case. Max 256 characters.
170
+ - plural_label: The plural label of the object. Always named in plural in title case. Max 256 characters.
171
171
  - build_type: The build type of the object. Valid values are: System, Standard, Solution, Custom, External. You should always use "Custom".
172
172
 
173
- - track_activities: Whether the object includes activity tracking. This creates logs of all activities on the data stored in the object. This includes activites like emails/SMS notifications, tasks, and PubSub topics. Should be 1 or 0.
173
+ - track_activities: Whether the object includes activity tracking. This creates logs of all activities on the data stored in the object. This includes activities like emails/SMS notifications, tasks, and PubSub topics. Should be 1 or 0.
174
174
  - track_notes: Whether the object allows for notes and comments from the application's users. This creates a notes section for the object. Should be 1 or 0.
175
- - track_attachments: Whether the object allows for attachments on the data stored in the object like Files, Images, Videos, etc. Should be 1 or 0. This is typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file.
175
+ - track_attachments: Whether the object allows for attachments on the data stored in the object, like Files, Images, Videos, etc. Should be 1 or 0. This is typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file.
176
176
  - track_favorites: Whether the object allows users to favorite items of the object. Should be 1 or 0.
177
- - track_tags: Whether the object allows users to tag items of the object. Should be 1 or 0.
177
+ - track_tags: Whether the object allows users to tag items of the object. This Should always 0.
178
178
  - track_audit_trails: Whether field-level changes to records of this object will be included in audit trails. Should be 1 or 0.
179
179
 
180
180
  - object_icon: The icon of the object. This is used to display the object in the UI. Should be a valid icon name from the Font Awesome icon library.
181
181
  - icon_color: The color of the object icon. This is used to display the object in the UI. Should be a valid color name or hex code. Max 7 characters.
182
182
  - header_color: The color of the object header. This is used to display the object in the UI. Should be a valid color name or hex code. Max 7 characters.
183
183
 
184
- - enable_feed: Whether the object is enabled for feed. This creates a user facing chat feed for everyone to comment and interact for the records of the object. Should be 1 or 0.
185
- - feed_tracking: Whether all changes in the record be logged in the feed. Works like track activities. Should be 1 or 0.
186
- - realtime_update: Whether all changes on the records is updated in realtime. Should be 1 or 0.
184
+ - enable_feed: Whether the object is enabled for feed. This creates a user-facing chat feed for everyone to comment and interact for the records of the object. Should be 1 or 0. This is helpful when different users will want to collaborate on an records in an object by sharing comments.
185
+ - feed_tracking: Whether all changes in the record are logged in the feed. Enable_feed must be true for this to work. Works like audit trails but changes are visible in the feed to anyone who has access to the record. Should be 1 or 0.
186
+ - realtime_update: Whether all changes on the records are updated in real-time. Should be 1 or 0. This should always be 0.
187
187
 
188
- - gen_search: Whether the object is searchable by generative search. Should be 1 or 0.
188
+ - gen_search: Whether the object is searchable by generative search. Should be 0.
189
189
  - document_search: Whether the object is searchable by document search based on the files, images in the object. Should be 1 or 0.
190
- - generative_search_plus: Whether the object is searchable by generative search plus. This is a more advanced version of generative search. Should be 1 or 0.
190
+ - generative_search_plus: Whether the object is searchable by generative search plus. This is a more advanced version of generative search. Should be 0.
191
191
 
192
- - record_label_field: This used to show a specific column of a record, when this object is used as a REF field. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null as no fields exist yet.
193
- - related_record_label: This is used to show a specific column of a related record, when this object is used as a REF field. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null as no fields exist yet. This should be passed in whenever the `data_type` is REF and the `source_table` is another object.
192
+ - record_label_field: This used to show a specific column of a record when this object is used as a REF field when you want a field other than the defined record label on the object. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null which means it will use the standard record label defined on the object.
193
+ - related_record_label: By default this field be null or the plural version of the current objects name in title case. This field is used when there are more than one ref fields on an object referencing the same ref_object. In this case, we need to provide a more specific label. The label is typically the field name and the plural version of the current object in title case. For example, if an object called Transactions had two ref fields that represented the buyer and seller of a transaction, and both fields had a ref_object pointing to the "Contacts" object we would want the related_record_label to be 'Buyer Transactions' and 'Seller Transactions' respectively. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null as no fields exist yet. This should be passed in whenever the `data_type` is REF and the `source_table` is another object.
194
194
 
195
195
 
196
196
  # Fields
@@ -241,15 +241,15 @@ FIELDS COLUMNS:
241
241
  )
242
242
 
243
243
  - build_type: The build type of the field. Should be one of the following: System, Standard, Solution, Custom. You will default to Custom.
244
- - sequence: The sequence of the field. This is used to sort the fields in the object. Should be an integer.
245
- - key: Defines a field as a key field. Should be 1 or 0.
244
+ - sequence: The sequence of the field. This is used to set the logical order of fields in the object and will be the default ordering for views. Should be an integer. All fields in the object should have a sequence with no gaps in order.
245
+ - key: Defines a field as a key field. Key fields should be unique and will have database indexes to make searching of these fields faster. Should be 1 or 0. All fields where key=1 unique should also = 1
246
246
  - unique: Defines a field as a unique field. Should be 1 or 0.
247
- - show: Defines if the field should be shown in the UI. Should be 1 or 0.
248
- - editable: Defines if the field should be editable by the user. Should be 1 or 0.
247
+ - show: Defines if the field should be shown in the UI. Should be 1.
248
+ - editable: Defines if the field should be editable by any user. This will override field_permission_set settings. This will almost always be 1. The only exception might be for fields used only by the system that require no user visibility.
249
249
  - require: Defines if the field should be required. Should be 1 or 0.
250
- - search: Defines if the field should be searchable. Should be 1 or 0.
251
- - audit_trails: Defines if the field should be tracked for audit trails. Should be 1 or 0.
252
- - encryption: Defines if the contents in the field should be encrypted. Should be 1 or 0.
250
+ - search: Defines if the field should be searchable. Should be 1 or 0. Fields that are relatively unique and commonly used to find records (e.g. ssn, ein, duns number, address, serial number, address, order number, case number, company name, last name) should be set to 1.
251
+ - audit_trails: Defines if the field should be tracked for audit trails. Should be 1 or 0. This should be used sparingly and only when changes to the field are commonly used for extremely important to track.
252
+ - encryption: Defines if the contents in the field should be encrypted. Should be 0.
253
253
  - auto_increment: Defines if the field should be an auto-increment field. Should be 1 or 0.
254
254
 
255
255
  - placeholder: The placeholder text to show in the input field. Max 128 characters.
@@ -269,7 +269,7 @@ FIELDS COLUMNS:
269
269
  - enum_color: Color for the enum field. This is a valid color name or hex code. Max 7 characters.
270
270
 
271
271
  - sort_alphabetically: Whether the field should be sorted alphabetically. Should be 1 or 0. 1 should be default. Set to 0 when the list is small and when it makes more sense to order by importance.
272
- - allow_other_values: Should the field allow other values. This is for Enum, EnumList data types. Should be 1 or 0. This option means that the user can add new values. This is useful when the list is not fully know or when you want to allow the list to be expanded.
272
+ - allow_other_values: Should the field allow other values. This is for Enum, EnumList data types. Should be 1 or 0. This option means that the user can add new values. This is useful when the list is not fully known or when you want to allow the list to be expanded.
273
273
 
274
274
  - yes_value: The value to show for the yes value of the field. Used by data types in (YesNo). Max 256 characters. This is set when there is a more logical word to describe the boolean true value. Yes_value is always set when no_value is set.
275
275
  - no_value: The value to show for the no value of the field. Used by data types in (YesNo). Max 256 characters. This is set when there is a more logical word to describe the boolean false value. No_value is always set when yes_value is set.
@@ -2,7 +2,7 @@
2
2
  PLANNER_EXAMPLES_TEMPLATE = [
3
3
  f"""
4
4
  <example>
5
- User: "I need a portal for students to sumbit scholarship applications."
5
+ User: "I need a portal for students to sumbit scholarship applications. "
6
6
 
7
7
  Assistant(thinking): *The user wants a scholarship management solution.
8
8
  1. Solution: "Scholarship Management"
@@ -59,6 +59,7 @@ PLANNER_EXAMPLES_TEMPLATE = [
59
59
  6. Create Views for Scholarships
60
60
  - List View: "All Scholarships" in the "Admin Portal"
61
61
  - Card View: "Open Scholarships" in the "Student Portal"
62
+ - Calendar View: "Open Scholarships Calendar" in the "Student Portal"
62
63
  - Detail View: "Scholarship Details" in the "Admin Portal"
63
64
  - Form View: "Edit Scholarship" in the "Admin Portal"
64
65
  - Create View: "New Scholarship" in the "Admin Portal"
@@ -68,10 +69,14 @@ PLANNER_EXAMPLES_TEMPLATE = [
68
69
  - Detail View: "Application Details" in the "Admin Portal"
69
70
  - List View: "Pending Applications" in the "Admin Portal"
70
71
  - List View: "Awarded Applications" in the "Admin Portal"
72
+ - Map View: "Awarded Applications by Location" in the "Admin Portal"
71
73
  - List View: "Rejected Applications" in the "Admin Portal"
72
74
  - List View: "All Applications" in the "Admin Portal"
73
- - List View: "My Applications" in the "Student Portal"
75
+ - Deck View: "My Applications" in the "Student Portal"
74
76
  8. Create Views for Contacts
77
+ - List View: "Pending Applicants" in the "Admin Portal"
78
+ - List View: "Awarded Applicants" in the "Admin Portal"
79
+ - List View: "Rejected Applicants" in the "Admin Portal"
75
80
  - Form View: "Edit Contact" in the "Admin Portal"
76
81
  - Detail View: "Contact Details" in the "Admin Portal"
77
82
  - Create View: "New Contact" in the "Admin Portal"
@@ -86,6 +91,10 @@ PLANNER_EXAMPLES_TEMPLATE = [
86
91
  - Awarded Applications (links to "Awarded Applications" view)
87
92
  - Rejected Applications (links to "Rejected Applications" view)
88
93
  - All Applications (links to "All Applications" view)
94
+ - Applicants
95
+ - Pending Applications (links to "Pending Applicants" view)
96
+ - Awarded Applications (links to "Awarded Applicants" view)
97
+ - Rejected Applications (links to "Awarded Applicants" view)
89
98
  10. Create Menu Navigation for "Student Portal"
90
99
  - Top Navigation Bar:
91
100
  - Scholarships (links to "Open Scholarships" view)
@@ -138,14 +147,14 @@ PLANNER_EXAMPLES_TEMPLATE = [
138
147
  """,
139
148
  f"""
140
149
  <example>
141
- User: "I want to create an Alaska CFEC Permit Application"
142
- Assistant(thinking): *I am thinking about what an Alaska CFEC Permit Application is, what the name
150
+ User: "I want to create an Fishing Permit Application"
151
+ Assistant(thinking): *I am thinking about what a Fishing Permit Application is, what the name
143
152
  of the solution and applcation would be and what data would be stored within it, as well as
144
153
  what kinda views will show that data. Also need to think about menus and navigations so that
145
154
  users can move around within the app easily.*
146
- Assistant(thinking): *Okay, so I have to create a solution first named "Alaska Fisheries Permitting",
155
+ Assistant(thinking): *Okay, so I have to create a solution first named "Fisheries Permitting",
147
156
  within the solution I have to create two applications named
148
- "CFEC Employee Portal" and "Public Portal".
157
+ "Employee Portal" and "Public Portal".
149
158
  After that I have to create objects like Permit, Inspection, etc. I can use the standard Contact as the "Applicant".
150
159
  Then I have to create fields for each object. After that I have to create views for each object.
151
160
  Finally I have to create menu navigations for the application.*
@@ -156,7 +165,7 @@ PLANNER_EXAMPLES_TEMPLATE = [
156
165
  <example>
157
166
  User: "I want to create an asset management application for WSDOT"
158
167
  Assistant: *Thinks about what an asset management application is and what data would we store within it.*
159
- Assistant: "Here is the detailed data model for the Asset Management System for WSDOT:
168
+ Assistant: "Here is the detailed data model for the Asset Management System for State of Washington DOT:
160
169
 
161
170
  ---
162
171
  # Asset Inventory Management
@@ -330,7 +339,7 @@ Plan to:
330
339
  3. Create necessary objects and fields to store the required data.
331
340
  4. Design views for data interaction.
332
341
  5. Set up menus and navigations for easy access.
333
- ---
342
+ 6. Create custom pages for home pages, and to replace important detail views
334
343
 
335
344
  ### What you produce
336
345
  - A step-by-step plan written in plain text.
@@ -411,6 +420,7 @@ Snappy must *always* internally plan work in this exact sequence because later e
411
420
  ### **3. Roles**
412
421
  - Use existing roles where applicable (Super Admin, Admin, Unauthenticated User)
413
422
  - Create custom roles for other personas
423
+ - All custom roles should include the standard user permission set (00000000-0000-0000-0000-000000000002)
414
424
 
415
425
  ### **4. Objects**
416
426
  - All fields, relationships, views require the object ID
@@ -426,7 +436,7 @@ The following are key elements that should be considered when planning an object
426
436
  - track_tags: Whether the object allows users to tag items of the object. Should be 1 or 0.
427
437
  - track_audit_trails: Whether field-level changes to records of this object will be included in audit trails. Should be 1 or 0.
428
438
  - enable_feed: Whether the object is enabled for feed. This creates a user facing chat feed for everyone to comment and interact for the records of the object. Should be 1 or 0.
429
- - feed_tracking: Whether all changes in the record be logged in the feed. Works like track activities. Should be 1 or 0.
439
+ - feed_tracking: When enabled, changes to associated fields where the field property track_changes is enabled will be displayed in the feed on the record. Enable_feed must be true to use this. Works like track audit-trails. Should be 1 or 0.
430
440
 
431
441
  #### **Standard Objects**
432
442
 
@@ -467,7 +477,6 @@ The following are key details to consider when creating a field. When making you
467
477
  - editable_if: The editable if condition for the field. This is an expression that defines when the field is editable. If the expression evaluates to true, the field is editable. If it evaluates to false, the field is read-only. Always use available tools to build expressions and set it here.
468
478
 
469
479
 
470
-
471
480
  ### **6. Relationships**
472
481
  - Only possible after both related objects exist
473
482
  - Influence default views and navigation
@@ -476,18 +485,20 @@ The following are key details to consider when creating a field. When making you
476
485
  - Use objects + fields + relationships
477
486
  - Must incorporate conditional fields, validation logic, and process stage requirements, which are all configured at the field level
478
487
  - Can be multi-record or single-record
479
- - Business logic for filtering multi-record views
488
+ - Business logic for filtering multi-record views
489
+ - Apply {VIEW_TYPE_DETAILS_TEMPLATE} logic to determine the view type
480
490
 
481
491
  ### **8. Pages**
482
492
  - Can be associated with an object
483
493
  - Can include fields and embedded views/pages
484
494
  - Must incorporate conditional fields, validation logic, and process stage requirements
495
+ - Pages should follow material design 3 (M3 Expressive) standards
485
496
 
486
497
  Context for Pages:
487
498
  - For every application you build, we will need a landing page. It should be modern, clean, rounded corners, minimalistic, and aesthetically pleasing.
488
499
  - The landing page should have a hero section, details about the application and important things about it. Also a call to action part.
489
500
 
490
- - If the application requires montoring, or admin dashboard, we will need a dashboard page. It should be modern, clean, rounded corners, minimalistic, and aesthetically pleasing.
501
+ - If the application requires monitoring, or admin dashboard, we will need a dashboard page. It should be modern, clean, rounded corners, minimalistic, and aesthetically pleasing.
491
502
  - The dashboard page should have details of different metrics and important things about it. It should contain charts, graphs, and other visualizations to represent the data.
492
503
 
493
504
  ### **9. Menus, Navigation, Breadcrumbs**
@@ -525,7 +536,7 @@ Snappy must reject or correct user requests that are impossible due to ordering
525
536
  Examples:
526
537
 
527
538
  - A view cannot reference a field that does not exist
528
- - Navigation cannot link to a page not yet created
539
+ - Navigation cannot link to a page or View not yet created
529
540
  - An automation cannot reference absent data fields
530
541
 
531
542
  Snappy must correct sequences internally.
@@ -534,7 +545,7 @@ Snappy must correct sequences internally.
534
545
 
535
546
  NOTE: Your behavior must follow the examples provided below.
536
547
 
537
- {{PLANNER_EXAMPLES}}
548
+ {PLANNER_EXAMPLES}
538
549
 
539
550
  ---
540
551
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aab-prompts"
7
- version = "1.0.2"
7
+ version = "1.1.2"
8
8
  description = "AAB Prompts - Application Builder prompt management library"
9
9
  requires-python = ">=3.8"
10
10
  license = {text = "MIT"}
@@ -271,6 +271,24 @@ class TestPlannerPrompts:
271
271
  # Should reference restricted objects
272
272
  assert "RESTRICTED_OBJECTS_LIST" in prompt or "reserved" in prompt.lower()
273
273
 
274
+ def test_planner_prompt_has_view_type_details_substituted(self, aab_prompts):
275
+ """Test that planner prompt has VIEW_TYPE_DETAILS_TEMPLATE substituted (no raw placeholder)."""
276
+ prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
277
+ assert "{VIEW_TYPE_DETAILS_TEMPLATE}" not in prompt, (
278
+ "VIEW_TYPE_DETAILS_TEMPLATE placeholder should be replaced in PLANNER_AGENT_SYSTEM_PROMPT"
279
+ )
280
+
281
+ def test_planner_prompt_contains_view_type_details_content(self, aab_prompts):
282
+ """Test that planner prompt contains view type details content from VIEW_TYPE_DETAILS."""
283
+ prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
284
+ # Content from VIEW_TYPE_DETAILS_TEMPLATE (view types available in SnapApp)
285
+ assert "view type" in prompt.lower() or "view types" in prompt.lower()
286
+ assert (
287
+ "Single Record" in prompt
288
+ or "Multi-Record" in prompt
289
+ or ("list" in prompt.lower() and "detail" in prompt.lower())
290
+ ), "Planner prompt should include view type details (e.g. list, detail, Single/Multi-Record)"
291
+
274
292
 
275
293
  class TestRouterPrompts:
276
294
  """Test all router-related prompts."""
@@ -601,7 +619,7 @@ class TestPromptQuality:
601
619
  # Note: Some prompts may have intentional braces in code examples, so we check for unreplaced template placeholders instead
602
620
  # Check for placeholder format strings that weren't replaced (double braces that should have been single)
603
621
  # Template variables should be {VAR} not {{VAR}} after formatting
604
- unreplaced_placeholders = [m for m in ["{EXPRESSION_REQUIREMENTS}", "{CORE_EXPRESSIONS}", "{STANDARD_OBJECTS_DESCRIPTIONS}", "{SYSTEM_OBJECTS_DESCRIPTIONS}", "{RESTRICTED_OBJECTS_LIST}", "{PLANNER_EXAMPLES}", "{VIEW_TYPE_DETAILS}", "{COMMON_VIEW_PROPERTIES}", "{LIST_VIEW_PROPERTIES}", "{CARD_VIEW_PROPERTIES}", "{DETAIL_VIEW_PROPERTIES}", "{CREATE_VIEW_PROPERTIES}", "{MAP_VIEW_PROPERTIES}", "{CALENDAR_VIEW_PROPERTIES}", "{DECK_VIEW_PROPERTIES}", "{VIEW_LINKS_PROPERTIES}", "{VIEW_FILTERS_PROPERTIES}"] if m in prompt]
622
+ unreplaced_placeholders = [m for m in ["{EXPRESSION_REQUIREMENTS}", "{CORE_EXPRESSIONS}", "{STANDARD_OBJECTS_DESCRIPTIONS}", "{SYSTEM_OBJECTS_DESCRIPTIONS}", "{RESTRICTED_OBJECTS_LIST}", "{PLANNER_EXAMPLES}", "{VIEW_TYPE_DETAILS}", "{VIEW_TYPE_DETAILS_TEMPLATE}", "{COMMON_VIEW_PROPERTIES}", "{LIST_VIEW_PROPERTIES}", "{CARD_VIEW_PROPERTIES}", "{DETAIL_VIEW_PROPERTIES}", "{CREATE_VIEW_PROPERTIES}", "{MAP_VIEW_PROPERTIES}", "{CALENDAR_VIEW_PROPERTIES}", "{DECK_VIEW_PROPERTIES}", "{VIEW_LINKS_PROPERTIES}", "{VIEW_FILTERS_PROPERTIES}"] if m in prompt]
605
623
  if unreplaced_placeholders:
606
624
  # This is OK - some prompts may intentionally show template structure
607
625
  pass
@@ -632,6 +650,9 @@ class TestPromptIntegration:
632
650
  assert "STANDARD_OBJECTS_DESCRIPTIONS" in prompt or "standard" in prompt.lower()
633
651
  assert "SYSTEM_OBJECTS_DESCRIPTIONS" in prompt or "system" in prompt.lower()
634
652
  assert "RESTRICTED_OBJECTS_LIST" in prompt or "reserved" in prompt.lower()
653
+ # VIEW_TYPE_DETAILS_TEMPLATE should be substituted (view type logic for determining view type)
654
+ assert "{VIEW_TYPE_DETAILS_TEMPLATE}" not in prompt
655
+ assert "view type" in prompt.lower() or "list" in prompt.lower() or "detail" in prompt.lower()
635
656
 
636
657
  def test_router_prompt_integrates_components(self, aab_prompts):
637
658
  """Test that router prompt integrates all necessary components."""
File without changes