feat(agent): reusable pi-agent workflow + agent image #2

Merged
charles merged 1 commit from feat/pi-agent-reusable-workflow into main 2026-06-05 11:28:09 +00:00
Owner

What

Adds an AI coding-bot pipeline that any Forgejo repo can consume via uses:, mirroring the existing qa-bun reusable-workflow + base-image pattern. Generalizes the bot that until now lived hardcoded in rara-website.

Changes

  • docker/agent.Dockerfile — amd64 CI runtime (Alpine, matching the original rara runner + first-class PHP 8.3 packages for consumers) baking Pi coding agent + umans provider + forge CLI (/usr/local/bin/forge) + generic skills (/opt/pi-skills) + pinned just. forge-cli is fetched at build time via a buildkit PACKAGE_TOKEN secret — never baked into a layer.
  • .forgejo/workflows/pi-agent.ymlworkflow_call reusable workflow. Issue label → coder → PR → reviewer pass. Host, repo, bot identity, label, model and config dir are all inputs; project skills auto-discovered from <config_dir>/skills/*; project toolchain via optional just agent-setup (skipped if undefined).
  • pi-skills/ — generic forgejo-cli + forgejo-branch-checkout skills, single source of truth, baked into the image (consumers no longer copy them → no drift).
  • .forgejo/workflows/release.ymlbuild-agent job pushes agent:<tag> + agent:latest.
  • README.md — pi-agent consumption section + agent-setup contract row; stale version refs bumped to v0.3.0.

Consumer contract

jobs:
  agent:
    if: ${{ github.event.label.name == 'pi-agent' }}
    uses: charles/forge-base/.forgejo/workflows/pi-agent.yml@v0.3.0
    with: { image_tag: v0.3.0, bot_name: my-bot, bot_email: my-bot@example.com }
    secrets:
      FORGEJO_BOT_TOKEN: ${{ secrets.FORGEJO_BOT_TOKEN }}
      UMANS_API_KEY: ${{ secrets.UMANS_API_KEY }}

+ a .pi-agent/ dir (settings.json, ci-coder.md, ci-reviewer.md, skills/).

Release sequence

After merge: tag v0.3.0release.yml builds + pushes forge-base/agent:v0.3.0. The rara-website consumer PR pins @v0.3.0 and only works once the tag + image exist.

Notes

  • amd64-only by design (CI runners are x86_64; forge-cli ships only x86_64).
  • Requires repo secret PACKAGE_TOKEN (already present, used by the bun image).

🤖 Generated with Claude Code

## What Adds an AI coding-bot pipeline that any Forgejo repo can consume via `uses:`, mirroring the existing `qa-bun` reusable-workflow + base-image pattern. Generalizes the bot that until now lived hardcoded in `rara-website`. ## Changes - **`docker/agent.Dockerfile`** — amd64 CI runtime (Alpine, matching the original rara runner + first-class PHP 8.3 packages for consumers) baking Pi coding agent + umans provider + forge CLI (`/usr/local/bin/forge`) + generic skills (`/opt/pi-skills`) + pinned `just`. forge-cli is fetched at build time via a buildkit `PACKAGE_TOKEN` secret — never baked into a layer. - **`.forgejo/workflows/pi-agent.yml`** — `workflow_call` reusable workflow. Issue label → coder → PR → reviewer pass. Host, repo, bot identity, label, model and config dir are all inputs; **project skills auto-discovered** from `<config_dir>/skills/*`; project toolchain via optional `just agent-setup` (skipped if undefined). - **`pi-skills/`** — generic `forgejo-cli` + `forgejo-branch-checkout` skills, single source of truth, baked into the image (consumers no longer copy them → no drift). - **`.forgejo/workflows/release.yml`** — `build-agent` job pushes `agent:<tag>` + `agent:latest`. - **`README.md`** — pi-agent consumption section + `agent-setup` contract row; stale version refs bumped to `v0.3.0`. ## Consumer contract ```yaml jobs: agent: if: ${{ github.event.label.name == 'pi-agent' }} uses: charles/forge-base/.forgejo/workflows/pi-agent.yml@v0.3.0 with: { image_tag: v0.3.0, bot_name: my-bot, bot_email: my-bot@example.com } secrets: FORGEJO_BOT_TOKEN: ${{ secrets.FORGEJO_BOT_TOKEN }} UMANS_API_KEY: ${{ secrets.UMANS_API_KEY }} ``` \+ a `.pi-agent/` dir (`settings.json`, `ci-coder.md`, `ci-reviewer.md`, `skills/`). ## Release sequence After merge: **tag `v0.3.0`** → `release.yml` builds + pushes `forge-base/agent:v0.3.0`. The rara-website consumer PR pins `@v0.3.0` and only works once the tag + image exist. ## Notes - amd64-only by design (CI runners are x86_64; forge-cli ships only x86_64). - Requires repo secret `PACKAGE_TOKEN` (already present, used by the bun image). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(agent): reusable pi-agent workflow + agent image
Some checks failed
pi-agent.yml / feat(agent): reusable pi-agent workflow + agent image (push) Failing after 0s
pi-agent.yml / feat(agent): reusable pi-agent workflow + agent image (pull_request) Failing after 0s
qa / qa (pull_request) Successful in 14s
qa / qa (push) Successful in 47s
d01d325cda
Add an AI coding-bot pipeline any Forgejo repo can consume via `uses:`,
mirroring the existing qa-bun reusable-workflow + base-image pattern.

- docker/agent.Dockerfile: amd64 CI runtime baking Pi + umans provider +
  forge CLI + generic skills (/opt/pi-skills) + just. forge-cli is fetched
  at build via a buildkit PACKAGE_TOKEN secret (not baked into a layer).
- .forgejo/workflows/pi-agent.yml: workflow_call. Issue label -> coder ->
  PR -> reviewer. Host/repo/bot-identity/skills all parameterized; project
  skills auto-discovered from <config_dir>/skills/*; toolchain via optional
  `just agent-setup`.
- pi-skills/: generic forgejo-cli + forgejo-branch-checkout skills (single
  source of truth, baked into the image).
- release.yml: build-agent job pushes agent:<tag> + agent:latest.
- README: pi-agent consumption docs; version refs bumped to v0.3.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
charles force-pushed feat/pi-agent-reusable-workflow from d01d325cda
Some checks failed
pi-agent.yml / feat(agent): reusable pi-agent workflow + agent image (push) Failing after 0s
pi-agent.yml / feat(agent): reusable pi-agent workflow + agent image (pull_request) Failing after 0s
qa / qa (pull_request) Successful in 14s
qa / qa (push) Successful in 47s
to da1f2ef900
All checks were successful
qa / qa (pull_request) Successful in 18s
qa / qa (push) Successful in 18s
2026-06-05 11:19:50 +00:00
Compare
charles deleted branch feat/pi-agent-reusable-workflow 2026-06-05 11:28:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/forge-base!2
No description provided.