@lead: issue #22 — per-agent skill scoping via permission.skill

This commit is contained in:
2026-07-04 05:25:06 +00:00
parent e8e299872a
commit a79b49b55e
2 changed files with 48 additions and 17 deletions
+19 -8
View File
@@ -5,16 +5,27 @@ Shared **AI dev-team** workflow for Gitea Actions, reusable across repos. It giv
## Agents
| Agent | Model | Vision | Mode | Role |
|-------|-------|:------:|------|------|
| `@pm` | `ollama-cloud/gemma4:cloud` | yes | comment | Product manager — research, plan, ask clarifying questions, and decide which dev should do the work. Comments only; never edits files. |
| `@junior` | `ollama-cloud/kimi-k2.7-code:cloud` | no | pr | Junior dev — small, low-risk changes (mostly YAML/compose/config). Text-only, cannot read images. Defers complex or image tasks to `@senior` or `@lead`. |
| `@senior` | `ollama-cloud/glm-5.2:cloud` | no | pr | Senior dev — complex, multi-file implementation (GLM-5.2 via Ollama Cloud, text-only). |
| `@lead` | `anthropic/claude-opus-4-8` | yes | pr | Tech lead — the hardest problems, architecture, and final calls. |
| `@qa` | `ollama-cloud/minimax-m3:cloud` | yes | comment | QA — verifies things work. Drives a headless browser (Playwright) to open a URL/web app, click through it, screenshot, and report bugs or confirm behavior. Comments findings; opens no PRs. |
| Agent | Model | Vision | Mode | Skills | Role |
|-------|-------|:------:|------|--------|------|
| `@pm` | `ollama-cloud/gemma4:cloud` | yes | comment | `gitea-api` | Product manager — research, plan, ask clarifying questions, and decide which dev should do the work. Comments only; never edits files. |
| `@junior` | `ollama-cloud/kimi-k2.7-code:cloud` | no | pr | — | Junior dev — small, low-risk changes (mostly YAML/compose/config). Text-only, cannot read images. Defers complex or image tasks to `@senior` or `@lead`. |
| `@senior` | `ollama-cloud/glm-5.2:cloud` | no | pr | `gitea-api`, `node1-ssh` | Senior dev — complex, multi-file implementation (GLM-5.2 via Ollama Cloud, text-only). |
| `@lead` | `anthropic/claude-opus-4-8` | yes | pr | `gitea-api`, `node1-ssh` | Tech lead — the hardest problems, architecture, and final calls. |
| `@qa` | `ollama-cloud/minimax-m3:cloud` | yes | comment | `gitea-api` | QA — verifies things work. Drives a headless browser (Playwright) to open a URL/web app, click through it, screenshot, and report bugs or confirm behavior. Comments findings; opens no PRs. |
`agent.yml`'s agent registry is the source of truth for this mapping — if you change a model
there, update this table too.
or an agent's skills there, update this table too.
### Per-agent skill scoping
Skills load **on-demand**: only a skill's one-line `description` ever appears in an agent's
`<available_skills>` list, and the full `SKILL.md` body (curl/API how-to) is fetched *only* when
the agent calls the `skill` tool — it is never baked into any system prompt. On top of that, each
agent's `skills` list in the registry drives an OpenCode `permission.skill` block that **denies all
skills by default and allows only the listed ones**. A denied skill is hidden entirely (its name and
description are omitted), so e.g. `@junior` never sees `gitea-api` — it just knows from the roster
that `@senior`/`@lead` can reach the Gitea API and asks them to. This keeps the "how it's done"
detail out of agents that shouldn't act on it while still letting them know the capability exists.
## Use it in a repo