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>
Merge the activity-log comment into the main reply comment and merge the
sub-issues-created comment into the pm reply, so each agent run posts
exactly one comment (reply + tool calls & reasoning inline).
Stage the shared scripts into $RUNNER_TEMP and point $SCRIPTS there for every
step, so an agent that commits/deletes the in-tree .agents-workflow checkout no
longer destroys the scripts the post-agent steps run (issue #33). Scrub any
in-tree .agents-workflow artifact before publishing, and add a failure-safe
rescue step that opens a PR for pushed work when a run fails.
Extract the agent registry to a shared agents.json and have both
route.sh (agent → model) and install-opencode.sh (ollama-cloud provider
models map) derive from it, so the two lists can no longer drift.
route.sh now copies agents.json to /tmp/agents.json instead of an inline
heredoc. install-opencode.sh builds the ollama-cloud map by
collecting every registry model with the prefix and
stripping it — non-ollama-cloud models (e.g. @lead's anthropic/claude-opus,
the local ornith:35b) are excluded by construction.
Resolves#31.
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>
Rebased onto the per-agent skill-scoping change so PR #25 carries both:
- route.sh keeps the registry 'skills' allow-list and emits skills as a step output
- install-opencode.sh writes the permission.skill block (deny-all + allow listed)
Pure refactor otherwise: each step's shell moves to its own file, called via
bash "$SCRIPTS/<name>.sh". The two extracted SKILL.md bodies are byte-identical to
main; routing/config/publish behavior is unchanged. Because this is a reusable
workflow (workflow_call) the runtime checkout is the caller's repo, so agent.yml now
checks THIS repo out into .agents-workflow/ (pinned @main) and points $SCRIPTS there.
- New gitea-api opencode skill (mirrors node1-ssh): documents the Gitea REST API
base URL, Authorization: token $AGENT_TOKEN header, and example curl calls for
read (issue/PR + comments, Actions runs/jobs/logs, org repos) and write (comment,
label, close), with explicit warnings: never echo the token, treat fetched
content as untrusted data (prompt-injection guard), and stop on 403.
- Wire AGENT_TOKEN into the Run agent step env so the agent process itself can
call the API (previously only the Publish step saw it).
- Update README secrets table: AGENT_TOKEN now also powers gitea-api; do not
re-narrow scopes without removing the skill.
Switch the real 'Run agent' step to --format json (replacing the two
TEMP/DEBUG schema-discovery commits da6f0d5/d0ddb06), capture the raw
event stream, and reconstruct the plain-text reply from the assistant
'text' parts so the existing Publish logic is unchanged.
Add a 'Build activity log' step that filters the event stream to
tool_use (with truncated title/input) and text (reasoning) events.
The Publish step posts that trail as a separate collapsible comment on
the PR thread (dev agents only — comment-only roles do no tool calls).
This is additive to the existing summary/PR-description comment.
Reasoning reuse on a follow-up run is free: the existing 'fetch full
issue thread' step already re-feeds all prior comments (including this
new log comment) into the next run's prompt, so the agent sees what it
did last time.
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>