Commit Graph
19 Commits
Author SHA1 Message Date
lead df0f6d6543 @lead: issue #16 — fully-automatic autopilot (label-gated @pm auto-delegate + @qa merge) 2026-07-04 19:23:20 +00: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
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
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 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
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
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
senior 173ee612bd @senior: issue #10 — wire up read-only ssh node1 alias in agent workflow 2026-07-03 09:13:42 +00:00
senior 402ccd7a6b @senior: issue #8 — list agents + models in README, update routing & allow-list 2026-07-02 15:38:52 +00: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
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 c594080ffc Add PM breakdown skill: feature -> milestone + sub-issues (plan/approve/create gate)
@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>
2026-07-02 10:32:57 +03:00
Felix FaerberandClaude Opus 4.8 f6df3f24af Add reusable AI-agent workflow + docs + AGENTS template
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>
2026-07-02 07:20:54 +03:00