From d8745277da1fb53808dc64e2e26bc8984b5bc625 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Mon, 9 Mar 2026 12:31:27 +0100 Subject: pkg/aflow: instructions for implementing tools in GEMINI.md Provide some instructions on how tools should be named, implemented and registered. Update #6878 --- pkg/aflow/GEMINI.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg') diff --git a/pkg/aflow/GEMINI.md b/pkg/aflow/GEMINI.md index 1d8a610e9..73808137c 100644 --- a/pkg/aflow/GEMINI.md +++ b/pkg/aflow/GEMINI.md @@ -45,6 +45,11 @@ Workflows are typically registered using `aflow.Register`. - First commit is better to be the simplest possible workflow definition without new tools. Commit `pkg/aflow: repro workflow skeleton` is an example. +### Implementing Tools +- Tool names (the first string argument to `aflow.NewFuncTool`) should use `lowercase-with-dashes` instead of `CamelCase`. +- If a tool does not refer to the kernel state or checkout path, declare its state parameter directly as `state struct{}` in the function signature, instead of defining an empty struct type. +- When registering tools for an `LLMAgent`, **always** use `aflow.Tools(tool1, tool2, toolSlice...)` to avoid aliasing issues that can occur when combining slices of tools. Do not use standard `append()` or `[]aflow.Tool{...}` literal initializations when combining or adding to existing tool sets. + ### LLM Integration - **Models**: Prefer `aflow.GoodBalancedModel` (Flash) for simple tasks and `aflow.BestExpensiveModel` (Pro) -- cgit mrf-deployment