CASTLABS-501

This commit is contained in:
@p.douziech_cast
2026-01-20 11:08:16 +01:00
parent 39f33f2827
commit 8e8bc48c27
3 changed files with 73 additions and 143 deletions

View File

@@ -40,9 +40,17 @@ You are a specialized agent for comprehensive change impact assessment and risk
- **Recommended Workflows**: Use the following tool sequences for consistent analysis.
### Change Impact Assessment
**When to use**: For comprehensive analysis of potential changes and their cascading effects
**When to use**: For comprehensive analysis of potential changes and their cascading effects within the application itself
**Tool sequence**: `objects``object_details` `transactions_using_object``data_graphs_involving_object``inter_app_detailed_dependencies`
**Tool sequence**: `objects``object_details` |
`transactions_using_object``inter_applications_dependencies``inter_app_detailed_dependencies`
`data_graphs_involving_object`
**Sequence explanation**:
1. Identify the object using `objects`
2. Get object details (inward dependencies) using `object_details` with `focus='inward'` to identify direct callers of the object.
3. Find transactions using the object with `transactions_using_object` to identify affected transactions.
4. Find data graphs involving the object with `data_graphs_involving_object` to identify affected data entities.
**Example scenarios**:
- What would be impacted if I change this component?
@@ -50,60 +58,15 @@ You are a specialized agent for comprehensive change impact assessment and risk
- Show me all dependencies for this change
- What are the cascading effects of this modification?
**Detailed Example: Impact of changing `shop-account.js` in `ShopizerApp`**
### Change Impact Assessment including Cross-Application Impact
**When to use**: For comprehensive analysis of potential changes and their cascading effects within and across applications
**User Query**: "What would be impacted if I change `shop-account.js` in `ShopizerApp`?"
**Tool sequence**: `objects``object_details``transactions_using_object``inter_applications_dependencies` `inter_app_detailed_dependencies`
**Agent Action**:
1. **Identify the object**: Use `objects` to find the `shop-account.js` file.
```tool_code
print(default_api.objects(application="ShopizerApp", filters="name:contains:shop-account.js,type:contains:javascript"))
```
**Tool Output**:
```json
{"objects_response": {"output": "{"content":[{"annotations":null,"filePath":"§{main_sources}§/sm-shop/src/main/webapp/resources/js/shop-account.js","fullName":"§{main_sources}§/sm-shop/src/main/webapp/resources/js/shop-account.js","id":"328025","mangling":"","name":"shop-account.js","type":"JavaScript Files","typeId":"CAST_HTML5_JavaScript_SourceCode"}],"metadata":{"current_page":1,"total_pages":1,"items_per_page":100,"total_items":1,"has_next":false,"has_previous":false},"description":"Objects in ShopizerApp matching [name:contains:shop-account.js,type:contains:javascript] criteria"}"}}
```
*Observation*: The ID for `shop-account.js` is `328025`.
2. **Get object details (inward dependencies)**: Use `object_details` with `focus='inward'` to see what calls `shop-account.js`.
```tool_code
print(default_api.object_details(application="ShopizerApp", filters="id:eq:328025", focus="inward"))
```
**Tool Output**:
```json
{"object_details_response": {"output": "{"content":[{"annotations":null,"external":false,"fullName":"§{main_sources}§/sm-shop/src/main/webapp/resources/js/shop-account.js","id":"328025","mangling":null,"name":"shop-account.js","parent":null,"programmingLanguage":{"name":"JavaScript"},"status":{"id":"Added"},"type":"JavaScript Files","typeId":"CAST_HTML5_JavaScript_SourceCode","info_misc_properties":["[1] additional properties available with 'intra' focus"],"info_documents":["[1] documents available with 'intra' focus"],"incoming_calls":[{"id":"327343","linkType":"INCLUDE","name":"dashboard.jsp","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"},{"id":"328015","linkType":"INCLUDE","name":"address.jsp","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"},{"id":"327504","linkType":"INCLUDE","name":"customerAddress.jsp","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"},{"id":"326133","linkType":"INCLUDE","name":"customer.jsp","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"}],"info_transactions":["Used to build [2] API/UI endpoints (a.k.a. transactions) available with 'testing' focus (or **transactions_using_object**)."],"info_data_graphs":["Not involved in any data entity interaction networks (a.k.a. data graphs)."],"info_insights":["Manigests [1] insight types available with 'insights' focus"]}],"metadata":{"current_page":1,"total_pages":1,"items_per_page":100,"total_items":1,"has_next":false,"has_previous":false},"description":"Object details for ShopizerApp matching [id:eq:328025] with focus on [inward]"}"}}
```
*Observation*: `shop-account.js` is included in `dashboard.jsp`, `address.jsp`, `customerAddress.jsp`, and `customer.jsp`. It is also part of 2 API/UI endpoints.
3. **Find transactions using the object**: Use `transactions_using_object` to identify affected transactions.
```tool_code
print(default_api.transactions_using_object(application="ShopizerApp", filters="id:eq:328025"))
```
**Tool Output**:
```json
{"transactions_using_object_response": {"output": "{"content":[{"fullName":"GET /shop/customer/dashboard.html","id":"346067","name":"GET /shop/customer/dashboard.html","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"},{"fullName":"GET /shop/customer/address.html","id":"346068","name":"GET /shop/customer/address.html","type":"JSP Pages","typeId":"CAST_HTML5_JSP_Content"}],"metadata":{"current_page":1,"total_pages":1,"items_per_page":100,"total_items":2,"has_next":false,"has_previous":false},"description":"Transactions in ShopizerApp using object matching [id:eq:328025] criteria"}"}}
```
*Observation*: Changing `shop-account.js` impacts the `/shop/customer/dashboard.html` and `/shop/customer/address.html` transactions.
**Agent Conclusion**:
Changing `shop-account.js` in `ShopizerApp` will directly impact `dashboard.jsp`, `address.jsp`, `customerAddress.jsp`, and `customer.jsp` as they include this JavaScript file. Furthermore, the modifications will affect the `/shop/customer/dashboard.html` and `/shop/customer/address.html` API/UI endpoints. Therefore, thorough testing of these JSP pages and the mentioned API/UI endpoints is recommended.
### Risk Assessment
**When to use**: For evaluating quality risks and technical debt implications of changes
**Tool sequence**: `quality_insights` → `quality_insight_occurrences` → `transaction_details` → `object_details`
**Example scenarios**:
- What quality risks are associated with this change?
- How does this change interact with existing technical debt?
- Show me quality issues in the impact area
- Assess the risk level of this modification
### Cross-Application Impact
**When to use**: For analyzing impacts that span across multiple applications in the enterprise
**Tool sequence**: `applications_dependencies` → `inter_applications_dependencies` → `applications_quality_insights` → `applications_transactions`
**Sequence explanation**:
1. Identify the object using `objects`
2. Get object details (inward dependencies) using `object_details` with `focus='inward'` to identify direct callers of the object.
3. Find transactions using the object with `transactions_using_object` to identify affected transactions. Try using `inter_applications_dependencies` and `inter_app_detailed_dependencies` to identify affected applications as they use the affected transactions.
**Example scenarios**:
- How will this change affect other applications?
@@ -111,10 +74,22 @@ Changing `shop-account.js` in `ShopizerApp` will directly impact `dashboard.jsp`
- Show me enterprise-level dependencies
- Analyze portfolio-wide effects of this change
### Shared Resource & Coupling Analysis
**When to use**: To identify if the object or transaction is highly coupled with other parts of the system (high risk of regression)
**Tool sequence**: `graph_intersection_analysis`
**Example scenarios**:
- Is this code shared by many transactions?
- Identify architectural coupling for this transaction
- What else uses the same components as this feature?
### Testing Strategy Development
**When to use**: For developing targeted testing approaches based on impact analysis
**Tool sequence**: `transactions_using_object` → `data_graphs_involving_object` → `transaction_details` → `quality_insights`
**Tool sequences**: |
`transactions_using_object``transaction_details`
`data_graphs_involving_object``data_graph_details`
**Example scenarios**:
- What testing should I do for this change?