feat(gitea): add gitea-workflow skill (human-facing dispatcher)
Adds the human-facing entry point and dispatcher for the Gitea integration per docs/adr/0011-gitea-skill-deep-modules.md. Preserves the retired flat skill's default no-args status view (open issues + open PRs, composed via list_issues/list_pull_requests) and extends its dispatch table to route ambiguous requests across all 6 domain skills (issues, labels/milestones, prs, branches, files, releases) — the old table only covered 4 of these. The skill only calls gitea-mcp tools directly for the composed status view; every other operation is a routed handoff to the owning sibling skill, keeping execution logic (call signatures, gotchas, confirmation gates) owned in one place. Bumps plugins/gitea version 1.1.0 -> 1.2.0 in both manifests for the new skill. Passed structural validation, provenance validation, and an independent clean-context skill-audit recheck (one finding fixed: allowed-tools was missing the Skill tool needed for routing). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FNJWdVvdgvZCHi1hZGqgVQ
This commit is contained in:
@@ -15,5 +15,5 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "gitea",
|
||||
"version": "1.1.0"
|
||||
"version": "1.2.0"
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
"skills": [
|
||||
"skills/"
|
||||
],
|
||||
"version": "1.1.0"
|
||||
"version": "1.2.0"
|
||||
}
|
||||
|
||||
28
plugins/gitea/skills/gitea-workflow/README.md
Normal file
28
plugins/gitea/skills/gitea-workflow/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# gitea-workflow
|
||||
|
||||
Human-facing entry point and dispatcher for the Gitea integration — the default status view plus routing to whichever domain skill owns an ambiguous request.
|
||||
|
||||
## What it does
|
||||
|
||||
This skill is the thin front door for the Gitea integration suite. With no arguments it reproduces the old flat skill's default status view: open issues and open PRs, composed by calling `gitea-issues`' and `gitea-prs`' underlying `list_issues`/`list_pull_requests` tools directly. For any other request, it resolves `owner`/`repo` once from the git remote and routes to whichever of the 6 domain skills owns the request — `gitea-issues`, `gitea-labels-milestones`, `gitea-prs`, `gitea-branches`, `gitea-files`, `gitea-releases` — rather than executing domain operations itself. It does not duplicate any domain skill's call signatures, dispatch verbs, or error recovery; those stay owned by the domain skill.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/gitea-workflow
|
||||
```
|
||||
|
||||
With no arguments: shows open issues + open PRs. With a request that doesn't already name a domain explicitly, describe what you want — the skill resolves owner/repo and routes to the right domain skill. If you already know which domain applies (issues, labels/milestones, PRs, branches, files, releases), you can invoke that skill directly instead — this one exists for the ambiguous/default case.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `SKILL.md` | Skill instructions for agents — routing table, default status view, Gotchas |
|
||||
| `references/README.md` | Describes the references directory contents |
|
||||
| `references/sources.md` | Provenance for the routing table and status-view call signatures |
|
||||
|
||||
## Related
|
||||
|
||||
- `plugins/bin/skills/gitea/SKILL.md` — the retired flat skill this one replaces (kept as a fallback reference per `docs/adr/0011-gitea-skill-deep-modules.md`, not deleted).
|
||||
- `plugins/gitea/skills/gitea-issues/`, `gitea-labels-milestones/`, `gitea-prs/`, `gitea-branches/`, `gitea-files/`, `gitea-releases/` — the 6 domain skills this one routes to.
|
||||
81
plugins/gitea/skills/gitea-workflow/SKILL.md
Normal file
81
plugins/gitea/skills/gitea-workflow/SKILL.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
name: gitea-workflow
|
||||
|
||||
description: >
|
||||
Use when a user makes a Gitea request that doesn't already name a specific domain, or asks for a
|
||||
general status check — "what's open", "what needs my attention", "gitea status", or bare
|
||||
`/gitea-workflow` with no arguments. Resolves the repo's owner/repo once from the git remote, then
|
||||
either runs the composed default status view (open issues + open PRs) or routes the request to
|
||||
whichever of the 6 domain skills owns it: gitea-issues, gitea-labels-milestones, gitea-prs,
|
||||
gitea-branches, gitea-files, gitea-releases. This skill does not execute domain operations itself
|
||||
— it composes/routes to the owning skill by name. Do not use when the request already clearly
|
||||
names one domain (e.g. "create an issue", "merge PR #12", "cut a release") — invoke that domain
|
||||
skill directly instead; this skill exists for the ambiguous/default case, not as a mandatory front
|
||||
door.
|
||||
|
||||
compatibility: Requires Gitea MCP server configured with write:issue and write:repository token
|
||||
scopes (for the composed status view's two list calls). Requires git remote "origin" pointing to
|
||||
the Gitea instance for owner/repo resolution.
|
||||
|
||||
metadata:
|
||||
category: integration
|
||||
version: "0.1.0"
|
||||
source_keys:
|
||||
- gitea-mcp-repo
|
||||
- gitea-mcp-slim-go
|
||||
- context7-websites-gitea
|
||||
- context7-gitea-tea-cli
|
||||
- gitea-flat-skill-dispatch
|
||||
|
||||
allowed-tools: Bash Skill mcp__gitea__list_issues mcp__gitea__list_pull_requests
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
|
||||
- **Issues and PRs share one number space — don't re-implement the disambiguation here.** A bare `#N` with no domain word (e.g. "close #12") is ambiguous: it could be an issue or a PR. Default to routing it to `gitea-issues` — its own `<N>` (get) dispatch already calls `issue_read` and checks `is_pull`, redirecting to `gitea-prs` itself if the number turns out to be a PR. This skill does not duplicate that detection.
|
||||
- **This skill never re-implements a domain skill's confirmation gates or error recovery.** If a routed request needs a destructive-op confirmation (branch deletion, PR merge, release/tag deletion), that confirmation happens inside the routed skill, not here. Routing here is a handoff, not a re-execution of the target's logic.
|
||||
- **Owner/repo are resolved once, here, and passed through.** Resolve them in Step 1 before dispatching, so the target domain skill doesn't re-resolve them from the git remote a second time. `gitea-files` in particular never resolves owner/repo itself — it always expects a caller to supply them, so this skill must pass them explicitly when routing there.
|
||||
- **This skill only ever calls two gitea-mcp tools directly** (`list_issues`, `list_pull_requests`), and only for the composed default status view. Every other operation is a routed call to a sibling skill by name — if you find yourself reaching for another `mcp__gitea__*` tool here, that's a sign the request should have been routed instead.
|
||||
|
||||
## Step 1 — Resolve owner and repo
|
||||
|
||||
Before the status view or any routed dispatch, extract `owner` and `repo` from the git remote:
|
||||
|
||||
```bash
|
||||
git remote get-url origin
|
||||
```
|
||||
|
||||
If origin is not set or the URL is not a Gitea URL, stop and report: "No Gitea remote found — set origin to your Gitea instance URL."
|
||||
|
||||
## Step 2 — Dispatch
|
||||
|
||||
| Invocation / trigger phrasing | Route to |
|
||||
|---|---|
|
||||
| `/gitea-workflow` (no args), "what's open", "gitea status", "what needs my attention" | **Status (default)** — composed below, no routing |
|
||||
| "create/get/close/comment on an issue", "what issues are open", "search issues for X" | `gitea-issues` |
|
||||
| "add/create/edit/delete a label", "list labels", "create/close a milestone", "what labels apply to X" | `gitea-labels-milestones` |
|
||||
| "open/merge/review a PR", "PR status", "PR diff", "approve/request changes" | `gitea-prs` |
|
||||
| "list/create/delete a branch", "what commits are on this branch", "show commit `<sha>`" | `gitea-branches` |
|
||||
| "read/create/update/delete a file in the repo", "what's in this directory", "show the repo tree" | `gitea-files` |
|
||||
| "cut a release", "publish a prerelease", "tag this commit", "what's the latest release" | `gitea-releases` |
|
||||
| A bare `#N` with no domain word | `gitea-issues` (see Gotchas — it self-corrects to PR if needed) |
|
||||
|
||||
Read the target skill's own `SKILL.md` for its full dispatch table and execution detail — this table only routes; it does not restate each domain's verbs.
|
||||
|
||||
## Step 3 — Execute
|
||||
|
||||
### Status (default)
|
||||
|
||||
Call `list_issues state: "open"` and `list_pull_requests state: "open"` in parallel, both scoped to the owner/repo resolved in Step 1. Report as two sections: open issues, open PRs.
|
||||
|
||||
### Routed request
|
||||
|
||||
Invoke the matched domain skill (Skill tool), passing along:
|
||||
- the resolved `owner`/`repo` from Step 1, so it doesn't need to re-resolve them
|
||||
- the user's original request/intent, so it doesn't need to re-derive what the user asked for
|
||||
|
||||
## Step 4 — Report
|
||||
|
||||
For the status view: a compact two-section list — issue/PR number, title, labels, milestone (same fields the old flat skill's status view reported).
|
||||
|
||||
For a routed request: pass through whatever the target skill reports; don't reformat or re-summarize its output beyond what's needed to present it in the conversation.
|
||||
16
plugins/gitea/skills/gitea-workflow/references/README.md
Normal file
16
plugins/gitea/skills/gitea-workflow/references/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
source_keys:
|
||||
- gitea-mcp-repo
|
||||
- gitea-mcp-slim-go
|
||||
- context7-websites-gitea
|
||||
- context7-gitea-tea-cli
|
||||
- gitea-flat-skill-dispatch
|
||||
---
|
||||
|
||||
# References
|
||||
|
||||
This directory contains provenance metadata and research sources for the `gitea-workflow` skill.
|
||||
|
||||
## Files
|
||||
|
||||
- `sources.md` — Extracted research sources and their contributing documents
|
||||
48
plugins/gitea/skills/gitea-workflow/references/sources.md
Normal file
48
plugins/gitea/skills/gitea-workflow/references/sources.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Sources
|
||||
|
||||
**Note on scope:** this skill has no fresh research corpus of its own — it is pure composition/
|
||||
routing over the 6 already-researched domain skills and the retired flat skill. The two entries
|
||||
below that carry `context7`/`gitea.com` URLs back the two gitea-mcp tool calls this skill makes
|
||||
directly (`list_issues`, `list_pull_requests`, for the composed status view); the routing table
|
||||
itself is sourced from the domain skills' own descriptions and the flat skill's dispatch table
|
||||
(the `gitea-flat-skill-dispatch` entry below).
|
||||
|
||||
## gitea-mcp-repo
|
||||
|
||||
- **URL:** https://gitea.com/gitea/gitea-mcp
|
||||
- **Description:** Official gitea-mcp repository (v1.3.0); operation/*.go source files documenting all 55 MCP tools, their parameters, and CLI flags. Backs the `list_issues`/`list_pull_requests` call shapes used in the composed status view.
|
||||
- **Research doc:** plugins/gitea/docs/research/docs/gitea/sources.md
|
||||
- **Contributing files:** SKILL.md
|
||||
- **Status:** `extracted`
|
||||
|
||||
## gitea-mcp-slim-go
|
||||
|
||||
- **URL:** https://gitea.com/gitea/gitea-mcp/raw/branch/main/operation/issue/slim.go
|
||||
- **Description:** Slim response shape structs from gitea-mcp source; confirms `list_issues`/`list_pull_requests` return one page per call with no server-side issue/PR type filter, informing why the status view calls both tools separately rather than assuming a combined feed.
|
||||
- **Research doc:** plugins/gitea/docs/research/docs/gitea/sources.md
|
||||
- **Contributing files:** SKILL.md
|
||||
- **Status:** `extracted`
|
||||
|
||||
## context7-websites-gitea
|
||||
|
||||
- **URL:** context7:/websites/gitea
|
||||
- **Description:** Official Gitea docs mirror on Context7 (docs.gitea.com content) — general issue/PR/branch/release vocabulary used to phrase the routing table's trigger examples consistently with Gitea's own terminology.
|
||||
- **Research doc:** plugins/gitea/docs/research/docs/gitea/sources.md
|
||||
- **Contributing files:** SKILL.md
|
||||
- **Status:** `extracted`
|
||||
|
||||
## context7-gitea-tea-cli
|
||||
|
||||
- **URL:** context7:/git_gitea_com/gitea_tea
|
||||
- **Description:** Official `tea` CLI (reference Gitea client) docs on Context7 — practitioner command patterns for issues, PRs, and releases. Consulted for completeness against the shared research doc; this skill is pure routing/composition with no CLI-command-pattern content of its own, so it contributes nothing here (see `gitea-issues`/`gitea-releases` for where this source actually informs content).
|
||||
- **Research doc:** plugins/gitea/docs/research/docs/gitea/sources.md
|
||||
- **Contributing files:** (none)
|
||||
- **Status:** `extracted`
|
||||
|
||||
## gitea-flat-skill-dispatch
|
||||
|
||||
- **Description:** This org's retired flat Gitea skill (`plugins/bin/skills/gitea/SKILL.md`) — its "Step 2 — Dispatch" table (5 domains: issues, labels, milestones, PRs, branches) and "Status (default)" behavior are the direct lineage this skill's routing table and default status view generalize across all 6 current domain skills, adding `gitea-files` and `gitea-releases` as new routing targets per `docs/adr/0011-gitea-skill-deep-modules.md`.
|
||||
- **Source:** org-internal (`plugins/bin/skills/gitea/SKILL.md`, kept in place as a fallback reference, not deleted)
|
||||
- **Research doc:** none — org-internal skill lineage, not part of the plugin's external research corpus (same pattern as `git-workflow`'s `org-git-conventions` entry)
|
||||
- **Contributing files:** SKILL.md
|
||||
- **Status:** `extracted`
|
||||
Reference in New Issue
Block a user