The kyberforge:gitea dispatch skill currently encodes both routing logic (when/why) and execution detail (how — parameter schemas, call flows, error recovery) in a single SKILL.md. This works for v1 but doesn't scale as the dispatch table grows or new repos/flows are added.
## Context
The `kyberforge:gitea` dispatch skill currently encodes both routing logic (when/why) and execution detail (how — parameter schemas, call flows, error recovery) in a single `SKILL.md`. This works for v1 but doesn't scale as the dispatch table grows or new repos/flows are added.
The following issue-create enrichments were identified during live testing but are deferred to this refactor:
Milestone assignment on create — after inferring labels, check milestone_read method: "list" for open milestones and assign if one clearly fits the issue scope. Requires milestone ID (not title) in the issue_write call.
Assignee on create — derive from git config user.name or leave unset. Gitea issue_write method: "create" accepts assignees: [<login>] but login cannot be discovered without read:user scope (get_me is blocked). Workaround: let user configure a default assignee login or leave unset.
Dependency linking — Gitea has no native dependency field in the MCP surface. Reference related issues in the body during create (e.g. Depends on #N) rather than via a separate API call. Document the convention
Label inference quality — the current fix infers labels from context signals. include a label inference guide: mapping between common context patterns and the Kind/* / Priority/* / Status/* taxonomy used in this repo.
## Gaps deferred to deep modules refactor
The following issue-create enrichments were identified during live testing but are deferred to this refactor:
**Milestone assignment on create** — after inferring labels, check `milestone_read method: "list"` for open milestones and assign if one clearly fits the issue scope. Requires milestone ID (not title) in the `issue_write` call.
**Assignee on create** — derive from `git config user.name` or leave unset. Gitea `issue_write method: "create"` accepts `assignees: [<login>]` but login cannot be discovered without `read:user` scope (`get_me` is blocked). Workaround: let user configure a default assignee login or leave unset.
**Dependency linking** — Gitea has no native dependency field in the MCP surface. Reference related issues in the body during create (e.g. `Depends on #N`) rather than via a separate API call. Document the convention
**Label inference quality** — the current fix infers labels from context signals. include a label inference guide: mapping between common context patterns and the `Kind/*` / `Priority/*` / `Status/*` taxonomy used in this repo.
Root cause of the type filter bug — MCP schema vs API spec drift
The Status section bug (calling list_issues with a non-existent type parameter) was caused by the skill being authored from Gitea REST API documentation rather than verified against the actual MCP tool schemas.
The MCP layer (gitea-mcp) wraps the REST API but deliberately slims it — parameters are omitted, response shapes are reduced, some API endpoints are combined into a single tool. The type filter exists in the Gitea REST API (GET /repos/{owner}/{repo}/issues?type=issues) but was not exposed in the mcp__gitea__list_issues tool schema. The research docs (api-reference.md) were derived from the MCP source (slim.go files) and correctly captured the MCP schema — but the skill body was written with API-level assumptions that didn't match.
General pattern: Any skill wrapping MCP tools must be authored against the MCP tool schema, not the underlying API. The MCP schema is the ground truth for what parameters exist, what they're called, and what the response shape looks like.
Question for the refactor: Do the reference files need to include explicit MCP tool call signatures (as verified against the live server), or is the api-reference.md research file sufficient? The research file is accurate for MCP schemas — the problem was that the skill author didn't consult it closely enough for every parameter. Options:
Each references/<domain>.md file includes the verified MCP call signatures, explicitly derived from the tool schema (not API docs)
The skill-author process for MCP-wrapping skills includes a mandatory step: cross-check every parameter against the loaded tool schema before writing the execution section
Both — reference files carry verified schemas AND authoring process enforces schema validation
Option 3 is the strongest but highest overhead. Option 2 alone (process fix) is the minimum. This is worth deciding during the refactor.
## Root cause of the `type` filter bug — MCP schema vs API spec drift
The `Status` section bug (calling `list_issues` with a non-existent `type` parameter) was caused by the skill being authored from Gitea REST API documentation rather than verified against the actual MCP tool schemas.
The MCP layer (`gitea-mcp`) wraps the REST API but deliberately slims it — parameters are omitted, response shapes are reduced, some API endpoints are combined into a single tool. The `type` filter exists in the Gitea REST API (`GET /repos/{owner}/{repo}/issues?type=issues`) but was not exposed in the `mcp__gitea__list_issues` tool schema. The research docs (`api-reference.md`) were derived from the MCP source (slim.go files) and correctly captured the MCP schema — but the skill body was written with API-level assumptions that didn't match.
**General pattern:** Any skill wrapping MCP tools must be authored against the MCP tool schema, not the underlying API. The MCP schema is the ground truth for what parameters exist, what they're called, and what the response shape looks like.
**Question for the refactor:** Do the reference files need to include explicit MCP tool call signatures (as verified against the live server), or is the `api-reference.md` research file sufficient? The research file is accurate for MCP schemas — the problem was that the skill author didn't consult it closely enough for every parameter. Options:
1. Each `references/<domain>.md` file includes the verified MCP call signatures, explicitly derived from the tool schema (not API docs)
2. The skill-author process for MCP-wrapping skills includes a mandatory step: cross-check every parameter against the loaded tool schema before writing the execution section
3. Both — reference files carry verified schemas AND authoring process enforces schema validation
Option 3 is the strongest but highest overhead. Option 2 alone (process fix) is the minimum. This is worth deciding during the refactor.
Full redesign scope has been resolved. Recording it here so it's not locked in chat history.
1. Plugin relocation
Skill moves from plugins/bin/skills/gitea/ into plugins/gitea/ (the actual plugin — currently a research-doc-only shell). Old plugins/bin/skills/gitea/ is left untouched for now (kept for reference/fallback, removed later once the new structure is validated) — not deleted in this pass.
2. Scope expansion
Adding 3 new domains verified working with the current token (write:issue, write:repository — see plugins/bin/skills/gitea/references/token-access.md): Files, Commits, Releases/Tags.
Explicitly deferred:
Blocked by token scope: repo/org listing, user identity, notifications, packages
Partially broken / unverified: Actions/CI (secrets + list_runs return 403), Wiki (404 on this repo, writes untested)
Each skill follows the git plugin's deep-module pattern: SKILL.md (orchestrator/when-why) + references/*.md (how) + references/sources.md (provenance) + README.md.
4. Comment #849's schema-verification question — resolved as "both"
Reference file call signatures are verified live against the loaded MCP tool schema via ToolSearch at authoring time (not copied from api-reference.md). kyberforge:skill-author's own authoring process was explicitly not changed in this pass (considered, declined as out of scope) — the verification discipline is applied manually during this implementation only.
5. Comment #848's deferred enrichments — all in scope
Landing in gitea-issues (composing gitea-labels-milestones):
Milestone assignment on create
Assignee on create (documented workaround given get_me/read:user is blocked)
Dependency-linking convention ("Depends on #N" in body text — no native API for this)
Existing research docs (api-reference.md etc.) are comprehensive but 100% code-derived from gitea-mcp source, with zero external/best-practice content (the original docs.gitea.com fetch timed out and was never retried). Backfilling now via context7 (/websites/gitea, /git_gitea_com/gitea_tea) + the research skill, before skill-authoring begins.
7. Deliberately deferred out of this PR
Wiring plugins/gitea/.mcp.json with the real gitea-mcp server config (currently manual via the user's ~/.claude.json) — tracked as a separate follow-up issue
Expanding to the remaining ~9 gitea-mcp domains not covered above
8. ADR
An ADR is being written in docs/adr/ to record this decision formally.
## Design resolved — grill-with-docs session summary
Full redesign scope has been resolved. Recording it here so it's not locked in chat history.
### 1. Plugin relocation
Skill moves from `plugins/bin/skills/gitea/` into `plugins/gitea/` (the actual plugin — currently a research-doc-only shell). Old `plugins/bin/skills/gitea/` is left untouched for now (kept for reference/fallback, removed later once the new structure is validated) — not deleted in this pass.
### 2. Scope expansion
Adding 3 new domains verified working with the current token (`write:issue`, `write:repository` — see `plugins/bin/skills/gitea/references/token-access.md`): **Files**, **Commits**, **Releases/Tags**.
Explicitly deferred:
- Blocked by token scope: repo/org listing, user identity, notifications, packages
- Partially broken / unverified: Actions/CI (secrets + list_runs return 403), Wiki (404 on this repo, writes untested)
### 3. Skill decomposition — 6 domain skills + orchestrator + agent
- `gitea-issues`
- `gitea-labels-milestones` (cross-cutting shared skill, composed by both `gitea-issues` and `gitea-prs`)
- `gitea-prs`
- `gitea-branches` (branches + commits)
- `gitea-files`
- `gitea-releases` (releases + tags)
- `gitea-workflow` (human-facing orchestrator, preserves the old `/gitea` default status view — composes `gitea-issues` + `gitea-prs` — invocation becomes `/gitea-workflow`)
- `gitea-orchestrate` (agent-facing deterministic counterpart, mirrors `plugins/git/agents/git-orchestrate`)
Each skill follows the git plugin's deep-module pattern: `SKILL.md` (orchestrator/when-why) + `references/*.md` (how) + `references/sources.md` (provenance) + `README.md`.
### 4. Comment #849's schema-verification question — resolved as "both"
Reference file call signatures are verified live against the loaded MCP tool schema via ToolSearch at authoring time (not copied from `api-reference.md`). `kyberforge:skill-author`'s own authoring process was explicitly **not** changed in this pass (considered, declined as out of scope) — the verification discipline is applied manually during this implementation only.
### 5. Comment #848's deferred enrichments — all in scope
Landing in `gitea-issues` (composing `gitea-labels-milestones`):
- Milestone assignment on create
- Assignee on create (documented workaround given `get_me`/`read:user` is blocked)
- Dependency-linking convention (`"Depends on #N"` in body text — no native API for this)
- Label inference guide (context-pattern → `Kind/*`/`Priority/*`/`Status/*` taxonomy mapping)
### 6. Research gap backfill
Existing research docs (`api-reference.md` etc.) are comprehensive but 100% code-derived from gitea-mcp source, with zero external/best-practice content (the original docs.gitea.com fetch timed out and was never retried). Backfilling now via context7 (`/websites/gitea`, `/git_gitea_com/gitea_tea`) + the research skill, before skill-authoring begins.
### 7. Deliberately deferred out of this PR
- Wiring `plugins/gitea/.mcp.json` with the real gitea-mcp server config (currently manual via the user's `~/.claude.json`) — tracked as a separate follow-up issue
- Expanding to the remaining ~9 gitea-mcp domains not covered above
### 8. ADR
An ADR is being written in `docs/adr/` to record this decision formally.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
The
kyberforge:giteadispatch skill currently encodes both routing logic (when/why) and execution detail (how — parameter schemas, call flows, error recovery) in a singleSKILL.md. This works for v1 but doesn't scale as the dispatch table grows or new repos/flows are added.Gaps deferred to deep modules refactor
The following issue-create enrichments were identified during live testing but are deferred to this refactor:
Milestone assignment on create — after inferring labels, check
milestone_read method: "list"for open milestones and assign if one clearly fits the issue scope. Requires milestone ID (not title) in theissue_writecall.Assignee on create — derive from
git config user.nameor leave unset. Giteaissue_write method: "create"acceptsassignees: [<login>]but login cannot be discovered withoutread:userscope (get_meis blocked). Workaround: let user configure a default assignee login or leave unset.Dependency linking — Gitea has no native dependency field in the MCP surface. Reference related issues in the body during create (e.g.
Depends on #N) rather than via a separate API call. Document the conventionLabel inference quality — the current fix infers labels from context signals. include a label inference guide: mapping between common context patterns and the
Kind/*/Priority/*/Status/*taxonomy used in this repo.Root cause of the
typefilter bug — MCP schema vs API spec driftThe
Statussection bug (callinglist_issueswith a non-existenttypeparameter) was caused by the skill being authored from Gitea REST API documentation rather than verified against the actual MCP tool schemas.The MCP layer (
gitea-mcp) wraps the REST API but deliberately slims it — parameters are omitted, response shapes are reduced, some API endpoints are combined into a single tool. Thetypefilter exists in the Gitea REST API (GET /repos/{owner}/{repo}/issues?type=issues) but was not exposed in themcp__gitea__list_issuestool schema. The research docs (api-reference.md) were derived from the MCP source (slim.go files) and correctly captured the MCP schema — but the skill body was written with API-level assumptions that didn't match.General pattern: Any skill wrapping MCP tools must be authored against the MCP tool schema, not the underlying API. The MCP schema is the ground truth for what parameters exist, what they're called, and what the response shape looks like.
Question for the refactor: Do the reference files need to include explicit MCP tool call signatures (as verified against the live server), or is the
api-reference.mdresearch file sufficient? The research file is accurate for MCP schemas — the problem was that the skill author didn't consult it closely enough for every parameter. Options:references/<domain>.mdfile includes the verified MCP call signatures, explicitly derived from the tool schema (not API docs)Option 3 is the strongest but highest overhead. Option 2 alone (process fix) is the minimum. This is worth deciding during the refactor.
Design resolved — grill-with-docs session summary
Full redesign scope has been resolved. Recording it here so it's not locked in chat history.
1. Plugin relocation
Skill moves from
plugins/bin/skills/gitea/intoplugins/gitea/(the actual plugin — currently a research-doc-only shell). Oldplugins/bin/skills/gitea/is left untouched for now (kept for reference/fallback, removed later once the new structure is validated) — not deleted in this pass.2. Scope expansion
Adding 3 new domains verified working with the current token (
write:issue,write:repository— seeplugins/bin/skills/gitea/references/token-access.md): Files, Commits, Releases/Tags.Explicitly deferred:
3. Skill decomposition — 6 domain skills + orchestrator + agent
gitea-issuesgitea-labels-milestones(cross-cutting shared skill, composed by bothgitea-issuesandgitea-prs)gitea-prsgitea-branches(branches + commits)gitea-filesgitea-releases(releases + tags)gitea-workflow(human-facing orchestrator, preserves the old/giteadefault status view — composesgitea-issues+gitea-prs— invocation becomes/gitea-workflow)gitea-orchestrate(agent-facing deterministic counterpart, mirrorsplugins/git/agents/git-orchestrate)Each skill follows the git plugin's deep-module pattern:
SKILL.md(orchestrator/when-why) +references/*.md(how) +references/sources.md(provenance) +README.md.4. Comment #849's schema-verification question — resolved as "both"
Reference file call signatures are verified live against the loaded MCP tool schema via ToolSearch at authoring time (not copied from
api-reference.md).kyberforge:skill-author's own authoring process was explicitly not changed in this pass (considered, declined as out of scope) — the verification discipline is applied manually during this implementation only.5. Comment #848's deferred enrichments — all in scope
Landing in
gitea-issues(composinggitea-labels-milestones):get_me/read:useris blocked)"Depends on #N"in body text — no native API for this)Kind/*/Priority/*/Status/*taxonomy mapping)6. Research gap backfill
Existing research docs (
api-reference.mdetc.) are comprehensive but 100% code-derived from gitea-mcp source, with zero external/best-practice content (the original docs.gitea.com fetch timed out and was never retried). Backfilling now via context7 (/websites/gitea,/git_gitea_com/gitea_tea) + the research skill, before skill-authoring begins.7. Deliberately deferred out of this PR
plugins/gitea/.mcp.jsonwith the real gitea-mcp server config (currently manual via the user's~/.claude.json) — tracked as a separate follow-up issue8. ADR
An ADR is being written in
docs/adr/to record this decision formally.