Enrich Workflow with more tools
### Background
To enrich Workflow use cases and to leverage to infrastructure we created we want to speed run adding more tools to workflow
### Tools and Priorities
Table contains the tools, and use cases they will enable. Priority marks the order in which we should go about adding them where 1 represents the most important ones
<table>
<tr>
<td>
**Tool name**
</td>
<td>
**Use cases it enables**
</td>
<td>
**Stage**
</td>
<td>
**Fail cases and responses**
</td>
<td>
**Priority**
</td>
</tr>
<tr>
<td>Read file </td>
<td>
* WF can get awareness on a CB so it can operate on it
</td>
<td>Execution </td>
<td>
* File might not exist or agent might not have access to it.
</td>
<td>Already exists </td>
</tr>
<tr>
<td>Write file </td>
<td>
* WF can make file changes. WF can create and generate code for the user
</td>
<td>Execution </td>
<td>
</td>
<td>Already exists </td>
</tr>
<tr>
<td>Run command </td>
<td>
* WF can work at the OS level
* Can run tests to make sure they pass
* Get better CB understanding for planing
</td>
<td>Planning, Execution </td>
<td>
* Command might ask for user input on std in blocking tool execution (related to https://gitlab.com/gitlab-org/duo-workflow/duo-workflow-service/-/issues/44#note_2045395573)
</td>
<td>Already exists </td>
</tr>
<tr>
<td>Search API</td>
<td>
* WF can access SCM, Epics, Issue, MR’s
* Get this issue and solve it
* Find duplicate code and refactor it
</td>
<td>Planing </td>
<td>
* Agent get confused because when presented with multiple, or irrelevant search results
* Time out is a rare risk but possible
</td>
<td>Already Exists </td>
</tr>
<tr>
<td>Create, Read, Update MR </td>
<td>
* WF can participate in a code review
* WF can author new MR’s from scratch
</td>
<td>Planing, Execution </td>
<td>
* There is a risk of agent creating excessive and redundant entities
</td>
<td>Creating a MR has not yet been implemented. Reading and updating an existing MR exists</td>
</tr>
<tr>
<td>Create,Read, Update Issue </td>
<td>
* WF can prepare a refactor plan and to create issue that will document the process
</td>
<td>Planing, Execution </td>
<td>
* There is a risk of agent creating excessive and redundant entities
</td>
<td>Creating and reading issues tool exists. Updating issues tool is incoming shortly along with the ability to write comments in notes.</td>
</tr>
<tr>
<td>Create, Read, Update Epic</td>
<td>
* WF can create an Epic and than create all the issues as child work items
</td>
<td>Planing, Execution </td>
<td>
* There is a risk of agent creating excessive and redundant entities
</td>
<td>5</td>
</tr>
<tr>
<td>Web browsing </td>
<td>
* WF can visit web pages to retrieve data from them
</td>
<td>Planing, Execution </td>
<td>
* Timeout and slow responses might decrease WF performance
* Irrelevant results might confuse agent
* Risk of adversary interaction using fabricated inputs (see https://www.businessinsider.com/google-ai-glue-pizza-i-tried-it-2024-5?IR=T)
</td>
<td>6</td>
</tr>
<tr>
<td>Notes API </td>
<td>
* Enables WF to insert comments into different model
</td>
<td>Planing, Execution </td>
<td>
* There is a risk of agent creating excessive and redundant entities
</td>
<td>Inserting/reading notes from MR exists. Issues and epics incoming 3</td>
</tr>
<tr>
<td>Consuming GitLab Public API</td>
<td>
* WF can interact with all of GitLab
* WF could optimize prioritize etc backlogs for planing
* Review all issues that are more than X old and decide if they are even relevant to the current CB
* Start to code all issues that are weighted X
</td>
<td>Planing, Execution </td>
<td>
* To broad access to API endpoints that mutates state of GitLab can create risk of agent causing harm with hallucinated actions
</td>
<td>Long term, spike is required to flash out full scope </td>
</tr>
</table>
epic