refactor(gitea): deep modules — split flat dispatch skill into 6 domain skills + orchestrator + agent #67
Reference in New Issue
Block a user
Delete Branch "refactor/6-gitea-deep-modules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #6.
What changed
Redesigns the gitea integration from a single flat dispatch skill (
plugins/bin/skills/gitea/SKILL.md, covering 5 of gitea-mcp's ~15 tool domains) into a self-containedplugins/gitea/plugin with deep-module skills, per the git plugin's established pattern. Full rationale indocs/adr/0011-gitea-skill-deep-modules.md.New skills (
plugins/gitea/skills/), each withSKILL.md+references/*.md+references/sources.mdprovenance +README.md:gitea-issues,gitea-labels-milestones(cross-cutting, shared by issues+PRs),gitea-prs,gitea-branches(+ commits),gitea-files(new domain),gitea-releases(+ tags, new domain)gitea-workflow— human-facing orchestrator, replaces the old/giteadefault status view (now/gitea-workflow)New agent:
gitea-orchestrate(Claude + Copilot pair) — deterministic agent-facing dispatcher mirroringgit-orchestrate.Research backfill:
plugins/gitea/docs/research/docs/gitea/gained external/best-practice content via context7 (/websites/gitea,/git_gitea_com/gitea_tea) — the existing docs were 100% code-derived from gitea-mcp source with no external content, since the original docs.gitea.com fetch had timed out and was never retried.Closed out from issue #6's comments:
gitea-issues/gitea-labels-milestones.ToolSearchagainst the deployed server, not copied fromapi-reference.md. This caught real drift in practice (gitea-issuesfoundlist_issueshas notype/milestonesparameter in the deployed schema despite both being documented upstream).Scope decisions (see ADR for full alternatives considered):
plugins/gitea/.mcp.jsonis deliberately left as a manual-setup shell — tracked in follow-up issue #66.plugins/bin/skills/gitea/is left untouched as a fallback reference, to be removed in a future cleanup once the new structure is validated in practice.Also included: a small, unrelated but necessary fix (
tests/run-bats.sh,tests/run-tests.sh) excluding.claude/worktrees/from test-file discovery — background-agent worktree checkouts were being picked up as spurious duplicate test suites, causing false pre-push failures.Follow-ups filed
plugins/gitea/.mcp.jsonTest plan
bash tests/run-tests.shpassesskill-audit/agent-auditpassed, plus an independent clean-context rechecksource_keys↔sources.md) across all 7 skills + the agent pair/gitea-workflow,/gitea-issues,/gitea-prsagainst a live repodd934d3b07tofddf39e396refactor(gitea): deep modules — split flat dispatch skill into 6 domain skills + orchestrator + agentto WIP: refactor(gitea): deep modules — split flat dispatch skill into 6 domain skills + orchestrator + agentSKILL.md, README.md, and references/{branches,commits}.md claimed list_branches, list_commits, and get_commit "work with write:issue alone." This contradicted docs/research/docs/gitea/overview.md, which documents write:repository as gating both reads and writes for repo-scoped tool families (Gitea hides these reads behind write scope). The prior empirical justification was invalid: it tested under a token holding both write:issue and write:repository simultaneously, which doesn't isolate which scope actually enabled the reads. Corrected all four files to state that list_branches, create_branch, and delete_branch require write:repository, confirmed directly by overview.md's scope enumeration. list_commits/get_commit are flagged as inferred to need the same scope by analogy rather than an overview.md-confirmed fact, since overview.md's write:repository enumeration names PR/branch/file/release/tag but not commits — this distinction surfaced during an independent audit pass and is now called out explicitly so the claim isn't overstated. Bumped SKILL.md metadata.version 0.1.0 -> 0.1.1 (patch: doc correction, no behavior change).Ran a documentation-accuracy pass on this PR's manual-smoke-test gap: 6 parallel review agents audited each new skill (
gitea-issues,gitea-labels-milestones,gitea-prs,gitea-branches,gitea-files,gitea-releases) plusgitea-workflow/gitea-orchestrateagainstplugins/gitea/docs/research/docs/gitea/*.md. Found 13 concrete issues; 6 fix agents applied corrections in isolated worktrees (routed throughkyberforge:forge→skill-author/plugin-author), and all 6 fixes were cherry-picked back onto this branch.Fixes landed:
gitea-releases(940e414): real bug —create_release's draft param isis_draft, notdraftas the Gotchas section claimed (would have silently published non-draft releases). Also softened unverified provenance/behavioral claims.gitea-issues/gitea-labels-milestones(1cd496e): corrected anexclusive-label-scope overclaim (org-only per docs, not repo-enforceable), added a missing owner/repo resolution step togitea-labels-milestonesfor direct invocation, softened an unsourced closing-keyword claim.gitea-files(d093755): added 3 missing gotchas fromtroubleshooting.md(signed-commit branch protection, base64-payload 413s, 404-vs-403 scope masking), plus fixed an unrelated pre-existing provenance gap insources.md.plugins/gitea/plugin.json(7b85e33): was missing the"agents": "agents/"manifest key entirely —gitea-orchestratewas likely undiscoverable despite being fully written. Registered it, version bumped to match.gitea-prs(3a4ae44):references/pull-requests.mdwrongly scopedmilestone/reviewers/team_reviewersparams to update-only methods; corrected to reflect they're valid oncreatetoo.gitea-branches(18ec0ab): corrected a token-scope claim —list_branches/create_branch/delete_branchrequirewrite:repository, notwrite:issuealone as previously stated.Test suite passes (7/7). Pushed to
refactor/6-gitea-deep-modules. The plugin-manifest fix (missingagentskey) is the one I'd flag as most worth a second look before merge — it's a structural gap, not just wording.WIP: refactor(gitea): deep modules — split flat dispatch skill into 6 domain skills + orchestrator + agentto refactor(gitea): deep modules — split flat dispatch skill into 6 domain skills + orchestrator + agent