Commit Graph
53 Commits
Author SHA1 Message Date
lead 7278e06dff Rename autopilot label 'fully-automatic' to 'auto' 2026-07-04 19:23:44 +00:00
lead df0f6d6543 @lead: issue #16 — fully-automatic autopilot (label-gated @pm auto-delegate + @qa merge) 2026-07-04 19:23:20 +00:00
ffaerber 23cc3e192e Merge pull request 'fix(activity-log): tool calls only (drop prose summary)' (#50) from fix/activity-tool-calls-only into main 2026-07-04 13:41:02 +02:00
Felix FaerberandClaude Opus 4.8 0a89309ff1 fix(activity-log): tool calls only — drop the agent's prose summary
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>
2026-07-04 14:40:59 +03:00
ffaerber cb11a6b2d1 Merge pull request 'fix(activity-log): strip PR-description block from reasoning trail' (#49) from fix/activity-log-strip-prdesc into main 2026-07-04 13:25:30 +02:00
Felix FaerberandClaude Opus 4.8 81882ee3ec fix(publish): de-dup agent comments (no repeated PR desc, no doubled header)
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>
2026-07-04 14:24:37 +03:00
Felix FaerberandClaude Opus 4.8 1987ba792d fix(activity-log): strip the PR-description block from the reasoning trail
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>
2026-07-04 14:12:32 +03:00
ffaerber a1ff1b9881 Merge pull request 'fix(route): resume existing ai/issue-N branch on re-trigger' (#47) from fix/route-resume-existing-branch into main 2026-07-04 12:21:07 +02:00
Felix FaerberandClaude Opus 4.8 d803ee7cf5 fix(route): resume an existing ai/issue-N branch instead of losing re-triggered work
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>
2026-07-04 13:21:04 +03:00
ffaerber 1d248bc675 Merge pull request 'fix: quote run-name (bare # was a YAML comment)' (#45) from fix/run-name-quoting into main 2026-07-04 11:33:29 +02:00
Felix FaerberandClaude Opus 4.8 1fd32f0ff6 fix: quote run-name so the issue number is not eaten as a YAML comment
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>
2026-07-04 12:33:27 +03:00
ffaerber e9fad6bfad Merge pull request 'chore: title agent runs by issue number (run-name)' (#43) from chore/run-name into main 2026-07-04 11:29:54 +02:00
Felix FaerberandClaude Opus 4.8 729a14f8bd chore: title agent runs by issue number (run-name)
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>
2026-07-04 12:29:09 +03:00
ffaerber d3c8f116f1 Merge pull request 'chore: standardize the ai-agent caller stub' (#41) from chore/standard-caller into main
Reviewed-on: ffaerber/agents#41
2026-07-04 11:24:49 +02:00
Felix FaerberandClaude Opus 4.8 658c10fc35 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) <noreply@anthropic.com>
2026-07-04 12:17:13 +03:00
ffaerber 649cd4ea9b Merge pull request 'fix(routing): expose agent skills in the roster' (#40) from fix/roster-skills into main 2026-07-04 11:00:39 +02:00
Felix FaerberandClaude Opus 4.8 509b10ac57 fix(routing): expose agent skills in the roster so pm routes by capability
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>
2026-07-04 11:56:27 +03:00
ffaerber 4ed96dcdf2 Merge pull request '@senior: One comment per agent run' (#39) from ai/issue-38 into main
Reviewed-on: ffaerber/agents#39
2026-07-04 10:55:39 +02:00
senior 767a3341fd feat(publish): one comment per agent run (issue #38)
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).
2026-07-04 08:42:56 +00:00
ffaerber 9a3ca95f9e Merge pull request '@junior: Add runtime .agents-workflow/ checkout to .gitignore' (#36) from ai/issue-35 into main 2026-07-04 09:47:41 +02:00
junior f0f1152545 Add runtime .agents-workflow/ checkout to .gitignore 2026-07-04 07:45:27 +00:00
ffaerber 13148ea68c Merge pull request 'Single source of truth for agent model IDs (fixes #31)' (#32) from ai/issue-31 into main 2026-07-04 09:43:28 +02:00
ffaerber d0a4de9682 Merge pull request '@lead: Dev-agent runs can break later steps by touching the runtime .agents-workflow scripts checkout' (#34) from ai/issue-33 into main 2026-07-04 09:43:13 +02:00
lead 423a060816 fix(agent): run step scripts from outside the workspace so agents can't break the run
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.
2026-07-04 07:34:53 +00:00
senior cafd36eae1 fix(agent): single source of truth for model IDs (route.sh + install-opencode.sh)
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.
2026-07-04 07:20:25 +00:00
Felix FaerberandClaude Opus 4.8 b3deee7412 fix(agent): route issue-opened events (event_name is workflow_call in reusable wf)
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>
2026-07-04 10:02:50 +03:00
ffaerber d8d4ba71c0 Merge pull request '@lead: agent skills' (#25) from ai/issue-22 into main
Reviewed-on: ffaerber/agents#25
2026-07-04 08:27:12 +02:00
lead 36ba91cdd8 @lead: externalize agent.yml inline scripts into .gitea/workflows/scripts/*.sh
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.
2026-07-04 05:54:27 +00:00
lead a79b49b55e @lead: issue #22 — per-agent skill scoping via permission.skill 2026-07-04 05:25:06 +00:00
ffaerber e8e299872a Update .gitea/workflows/agent.yml 2026-07-03 22:30:05 +02:00
ffaerber 9760d3b652 Merge pull request '@junior: run on issue' (#24) from ai/issue-23 into main
Reviewed-on: ffaerber/agents#24
2026-07-03 22:28:16 +02:00
junior 3ad5c28243 @junior: issue #23 — trigger @pm on new issues in this repo 2026-07-03 20:26:03 +00:00
ffaerber 6decdd4658 Update .gitea/workflows/agent.yml 2026-07-03 22:11:42 +02:00
ffaerber 205b26a2f0 Update .gitea/workflows/agent.yml 2026-07-03 22:08:25 +02:00
ffaerber 25c915f540 Merge pull request '@senior: gitea' (#15) from ai/issue-14 into main
Reviewed-on: ffaerber/agents#15
2026-07-03 13:10:41 +02:00
senior fdf966c765 @senior: issue #14 — add gitea-api skill + expose AGENT_TOKEN to the agent process
- 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.
2026-07-03 11:07:38 +00:00
ffaerber c5eaa3c5a5 Merge pull request '@junior: agents ssh' (#13) from ai/issue-12 into main
Reviewed-on: ffaerber/agents#13
2026-07-03 12:09:09 +02:00
lead 459a0c64b8 @lead: node1-ssh skill points to homelab opencode.json allowlist instead of inventing one 2026-07-03 09:50:48 +00:00
junior 5c4f03a397 @junior: issue #12 2026-07-03 09:45:48 +00:00
ffaerber 343a422233 Merge pull request '@senior: Wire up ssh node1 … in the agent workflow (read-only swarm diagnostics)' (#11) from ai/issue-10 into main
Reviewed-on: ffaerber/agents#11
2026-07-03 11:17:49 +02:00
senior 173ee612bd @senior: issue #10 — wire up read-only ssh node1 alias in agent workflow 2026-07-03 09:13:42 +00:00
ffaerber 0362e09737 Merge pull request '@senior: readme' (#9) from ai/issue-8 into main
Reviewed-on: ffaerber/agents#9
2026-07-02 17:51:55 +02:00
senior 402ccd7a6b @senior: issue #8 — list agents + models in README, update routing & allow-list 2026-07-02 15:38:52 +00:00
ffaerber d8c47849cd Merge pull request '@senior: opscode events are not in the PR' (#5) from ai/issue-4 into main
Reviewed-on: ffaerber/agents#5
2026-07-02 15:52:43 +02:00
senior 92ad8ef436 @senior: issue #4 — one PR per run, post activity log to the PR thread 2026-07-02 13:51:21 +00:00
ffaerber 0fa2e7b6d8 Merge pull request '@senior: opencode logs' (#3) from ai/issue-2 into main
Reviewed-on: ffaerber/agents#3
2026-07-02 15:21:47 +02:00
senior 15285d228f Post opencode activity log (tool calls + reasoning) as a PR comment (#2)
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.
2026-07-02 13:17:14 +00:00
Felix FaerberandClaude Opus 4.8 d0ddb06ccb DEBUG: post captured --format json schema as an issue comment (findable + fetchable)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 15:21:48 +03:00
Felix FaerberandClaude Opus 4.8 da6f0d5b92 TEMP: debug step to capture opencode --format json event schema
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>
2026-07-02 15:14:37 +03:00
Felix FaerberandClaude Opus 4.8 6b5c1bb888 Dogfood: add thin caller + AGENTS.md so agents work on the agents repo itself
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 10:47:15 +03:00