From 658c10fc35cf45bc2ee2e07e212238d882e6afbf Mon Sep 17 00:00:00 2001 From: Felix Faerber Date: Sat, 4 Jul 2026 12:17:13 +0300 Subject: [PATCH] chore: standardize the ai-agent caller stub (identical in every repo) The caller workflow had drifted between repos (run-name, stale SHA comment, trigger ordering, different comment text) though all were functionally the same `uses: agent.yml@main`. Define one canonical stub: make this repo's own ai-agent.yml the reference and update the README "Use it in a repo" block to match it verbatim, noting that the on: triggers and the jobs.agent wrapper are the irreducible minimum for a reusable (workflow_call) workflow. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ai-agent.yml | 6 ++++-- README.md | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ai-agent.yml b/.gitea/workflows/ai-agent.yml index 252f921..a795f82 100644 --- a/.gitea/workflows/ai-agent.yml +++ b/.gitea/workflows/ai-agent.yml @@ -1,6 +1,8 @@ name: ai-agent -# Thin caller so the agents work on THIS repo too (their own workflow). Same shared logic. -# New issues opened by ffaerber auto-start @pm; @mention an agent in a comment to route on replies. +# Standard caller for the shared AI-agent workflow (ffaerber/agents). Copy this file VERBATIM into +# any repo that should get the agents — it is identical in every repo. All logic + scripts live in +# agents/.gitea/workflows/; scripts are fetched from @main at run time. The `jobs.agent` wrapper is +# required: a reusable (workflow_call) workflow can only be invoked from a caller job, not top-level. on: issue_comment: types: [created] diff --git a/README.md b/README.md index dbc02fc..268078a 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,16 @@ detail out of agents that shouldn't act on it while still letting them know the ## Use it in a repo -Add `.gitea/workflows/ai-agent.yml` to the consuming repo: +**The standard caller is one file, identical in every repo.** Copy this repo's own +[`.gitea/workflows/ai-agent.yml`](.gitea/workflows/ai-agent.yml) verbatim into the consuming repo — +it is the source of truth, and `agents` itself uses the same file: ```yaml name: ai-agent +# Standard caller for the shared AI-agent workflow (ffaerber/agents). Copy this file VERBATIM into +# any repo that should get the agents — it is identical in every repo. All logic + scripts live in +# agents/.gitea/workflows/; scripts are fetched from @main at run time. The `jobs.agent` wrapper is +# required: a reusable (workflow_call) workflow can only be invoked from a caller job, not top-level. on: issue_comment: types: [created] @@ -44,7 +50,9 @@ jobs: secrets: inherit ``` -That's the whole per-repo footprint. All the logic (agent registry, routing, delegation, +That's the whole per-repo footprint, and it's the minimum a caller can be: the `on:` triggers must +live in each repo (a reusable workflow can't declare its callers' triggers) and the `jobs.agent` +wrapper is mandatory for `workflow_call`. Everything else (agent registry, routing, delegation, reactions, PR/issue plumbing) lives here in `agent.yml`. ## Repo layout -- 2.54.0