-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Plan: Create Dedicated Workflow Tools
Objective
To improve the robustness, maintainability, and simplicity of the agent's workflow, we will encapsulate the logic for creating Pull Request descriptions and Release Notes into dedicated tools. This moves complex, multi-step procedures from documentation (AGENTS.md) into code, making the agent's instructions simpler and the process more reliable.
Proposed File Location
New tools will be created in a dedicated file: src/ai/tools/workflow-tools.ts
Task Breakdown
Phase 1: Core Tool Development
-
Create the new file
src/ai/tools/workflow-tools.ts.- Set up the basic structure for defining and exporting tools.
-
Implement the
createPullRequestDescriptiontool.- Define the tool's schema (name, description, parameters). It should not require any parameters.
- The tool's logic will:
- Automatically detect the current git branch name.
- Execute
git diff main...<current-branch>to get the changes. - Return the formatted diff output, ready for the agent to summarize.
-
Implement the
createReleaseNotestool.- Define the tool's schema. It might take an optional
previousTagparameter, or automatically find the latest tag. - The tool's logic will:
- Find the most recent git tag (e.g.,
git describe --tags --abbrev=0). - Get the list of commit messages between the tag and
HEAD(e.g.,git log <latest-tag>..HEAD --oneline). - Return the formatted list of commits, ready for the agent to turn into release notes.
- Find the most recent git tag (e.g.,
- Define the tool's schema. It might take an optional
Phase 2: Integration & Documentation
-
Integrate the new tools into the agent's toolbelt.
- Import the new tools in the main application logic where tools are registered.
- Add them to the list of available tools for the AI model.
-
Update
AGENTS.mddocumentation.- Remove the detailed, multi-step instructions for creating PR descriptions and release notes.
- Replace them with simple instructions advising the agent to use the
createPullRequestDescriptionandcreateReleaseNotestools directly.
Phase 3: Verification
- Manually test the
createPullRequestDescriptiontool.- Run the agent and ask it to create a PR description to verify it uses the new tool correctly and produces the expected output.
- Manually test the
createReleaseNotestool.- Run the agent and ask it to create release notes to verify the tool works as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels