PR #55 added @ops to the registry but route.sh only looped pm/junior/senior/lead/qa, so @ops could
never be triggered, and there was no token case for it. Add 'ops' to the routing loop and the
TOKEN_OPS case in route.sh + publish.sh, and pass TOKEN_OPS in the workflow env next to TOKEN_QA
(route/publish/rescue steps) so route.sh (set -u) doesn't error on an @ops run.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ops now treats gitea/secrets/tokens.md as the source-of-truth inventory (readable by @ffaerber and
@ops only) and records every token it mints/rotates there, alongside storing the live value in the
matching Actions secret.
A comment-mode operator agent (opus) for administering Gitea itself from issues in gitea/ops:
create orgs/users/repos, manage labels & Actions secrets, and mint least-privilege per-user tokens.
- agents.json: new @ops role (comment-mode, skill gitea-admin, confirms before destructive ops).
- skill-gitea-admin.sh: SKILL.md documenting org/user/repo/label/secret ops + the create-user →
mint-scoped-token → store-as-secret flow (never printing tokens). Gated on NAME=ops so the admin
how-to is written ONLY for @ops; permission.skill also denies it to other agents.
- agent.yml: wire the skill step (uses AGENT_TOKEN — an admin PAT during bootstrap).
Bootstrap note: AGENT_TOKEN is admin for now, so every agent's process technically holds an admin
credential (skill-scoping hides the doc, not the env var). Once @ops is minting scoped per-user
tokens, narrow AGENT_TOKEN and inject a dedicated admin token only for @ops.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qa's autopilot merge used the built-in Actions token (TOKEN_QA unset -> fell back to GITEA_TOKEN).
Gitea does not fire new workflow runs for pushes made by the built-in Actions token, so the merge
landed on main but deploy.yml never ran — the change was merged-but-not-deployed. Merge with
AGENT_TOKEN (a PAT, already used for delegation and proven to trigger runs) so the push to main
triggers the deploy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per maintainer: @qa must never change code — it only accepts a PR or sends it back to the dev with
precise instructions. Replaces the halt-on-any-problem behavior with a bounce loop:
- QA prompt: emit MERGE_PR (approve), or `BOUNCE: @<dev>` after spelling out exactly what to change.
HALT_AUTOPILOT is now only for problems a dev can't fix (needs a human decision).
- publish.sh: on BOUNCE, re-trigger the named dev (via AGENT_TOKEN) with "autopilot fix attempt N/3".
Count prior attempts from the PR thread; at 3 it stops (removes the label) and hands to @ffaerber.
- publish.sh: after a dev pushes a fix (resume), auto-re-trigger @qa to re-verify — closing the loop
(dev fix -> qa re-check -> merge or bounce again).
- Updated the initial @qa trigger wording (bounce, not halt).
Verified: BOUNCE target parsing and the 3-strike counter (attempts 1/3,2/3,3/3 then HALT).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The activity <details> was labelled 'tool calls & reasoning' but included the agent's final prose
summary ('Added the whoami service... Exposed via Traefik... Pushed to branch...'), which is just a
restatement of the PR description and not a tool call. Emit only tool_use events; relabel to
'N tool calls'. The what-changed narrative lives in the PR description; this section is the record of
actions taken.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Batches the remaining comment-noise cleanups on top of the activity-log fix:
- Resume comment no longer re-posts the full PR description (## Summary/## Changes) — the PR body and
diff already carry it; the comment just links the PR (the reasoning trail shows what the run did).
- Strip a leading self-header the model sometimes emits ("🤖 **@pm**" on its own line, sometimes
twice) before we prepend our own, so headers aren't doubled.
- Also drop the BEGIN_PR_DESCRIPTION block from the plain reply text, and simplify the activity
block's summary (it repeated "🤖 **@name** — activity log").
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 'tool calls & reasoning' activity log dumped each text part verbatim, including the agent's
BEGIN_PR_DESCRIPTION..END_PR_DESCRIPTION block — which is already published as the PR description, so
it appeared twice (e.g. homelab PR #117). Strip that block from text parts, and drop a text entry
that becomes empty after stripping.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When an agent was re-triggered on an issue that already had a branch/open PR, route.sh created a
fresh branch from main (git checkout -b), so the push back was rejected non-fast-forward and the new
commits were silently dropped (|| true) -- the run reported success and re-announced the stale PR,
but the work was gone (observed on issue #17 run #88). Resume the existing branch when it exists, so
new commits fast-forward onto it and update its PR; only branch from main when none exists.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bare '#' starts a YAML comment, so run-name resolved to 'ai-agent ·' with the number dropped.
Quote the value.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Without run-name, Gitea titles each ai-agent run by main's head commit, so runs aren't identifiable
in the Actions list. Add `run-name: ai-agent · #${{ github.event.issue.number }}` to the standard
caller (both the file and the README stub) so each run shows its issue.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>
The homelab health-check test mis-routed a node1 inspection to @junior (skills: []), which cannot
reach node1 — only @senior/@lead hold node1-ssh. Root cause: the roster shown to agents listed
desc + vision but not skills, so @pm had no way to route by capability (despite a comment claiming
it could). Add each teammate's skill names to the roster line. Names only; the scoped how-to detail
stays hidden via permission.skill.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shared agent.yml is a reusable (workflow_call) workflow, so on Gitea
github.event_name evaluates to 'workflow_call' — not the original 'issues'/
'issue_comment'. route.sh branched on EVENT == "issues", so issue-opened runs
scanned the empty comment body and skipped the @pm fallback, exiting 1 with
"no known agent mentioned" (runs #393/#394). Comment runs were unaffected
because the @mention lives in $BODY.
Discriminate on the comment id (CID) instead, which IS reliably forwarded in
the event payload: empty => issue-opened (scan issue body, default @pm), set
=> comment (scan comment body). Also add .gitignore for .env.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Runs a tiny Sonnet probe and dumps the raw events to the Actions log so we can build the
PR-progress parser against the real schema. Removed once captured.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pm proposes a milestone + sub-tasks and asks for approval; on 'yes' it emits a BEGIN_SUBTASKS
block, and the workflow creates the milestone + one sub-issue per line (each 'Part of #<feature>').
Sub-issues are not auto-started — maintainer @mentions an agent on each when ready.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reusable workflow (on: workflow_call) moved from homelab; consuming repos add a thin caller
(uses: ffaerber/agents/.gitea/workflows/agent.yml@main, secrets: inherit).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>