FM-3 Migrate agents to forge-mcp, drop forgejo-mcp from image + patches #654

Closed
opened 2026-05-01 18:32:46 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a platform engineer, I want every agent skill, image, and config switched from mcp__forgejo__* (upstream binary) to mcp__forge__* (our wrapper), so that the upstream binary + patches/ directory disappear from this repo and we own the entire forge-MCP surface.

Acceptance criteria

Skill rewrites

  • Every /skills/*.md file is rewritten to call mcp__forge__* tools. git grep "mcp__forgejo__" under /skills/ returns zero hits.
  • One-time grep + sed pass applies the rename table:
    • get_issue_by_indexget_issue
    • list_repo_issueslist_issues
    • list_issue_commentslist_comments
    • create_issue_commentcreate_comment
    • create_review_requestsrequest_reviewers
    • delete_review_requestsremove_review_request
    • submit_pull_reviewsubmit_review
    • get_pull_request_by_indexget_pull_request
    • list_repo_pull_requestslist_pull_requests
    • (full table in the migration commit message for review)
  • Skills calling dropped tools (notifications, org admin, branch/repo CRUD, search) are rewritten to use surviving equivalents or fail loudly so the loss is visible.

Image rebuild

  • Dockerfile drops the multi-stage forgejo-mcp build. The patches/ directory is deleted. claude-hooks:dev rebuild produces a smaller image with no Go toolchain in the build stage.
  • apps/forge-mcp build artifact is copied in at /usr/local/bin/forge-mcp.
  • config/mcp-builtin.json carries exactly one entry: forge, command forge-mcp, transport stdio. (Per-type shape from specs/drop-default-builtins.md if that spec ships first; legacy single-entry shape otherwise.)

Agent-env-sync wiring

  • agent-env-sync.renderForInstance injects FORGE_TYPE, FORGE_REPO, FORGE_TOKEN into the rendered .claude.json::mcpServers.forge.env per dispatch.
  • For multi-repo dispatches (foreman cross-repo edits), FORGE_TOKENS (plural JSON) is rendered with the per-forge token map.

Memory + docs

  • ~/.claude/projects/.../memory/mcp_merge_bug.md is deleted (the patches it documented no longer exist).
  • New docs/forge-mcp.md documents the tool surface, env contract, and per-forge differences (e.g. GitLab approve-only review).
  • docs/credentials.md updated: FORGE_TOKEN env var replaces FORGEJO_ACCESS_TOKEN for agent containers.
  • ~/.claude/CLAUDE.md reference to forgejo-mcp under "Forgejo / issue tracking" updated to forge-mcp once cut over.

Verification

  • Boss agent dispatches a real PR through the boss → reviewer → merge loop on charles/claude-hooks (Forgejo) using only mcp__forge__* calls. Loop closes successfully.
  • Same loop on a GitLab test repo (gates on FM-4 standing one up — coordinate or stub).

Out of scope

  • recommended-catalog.json for non-builtin MCPs (covered in specs/drop-default-builtins.md).
  • The host's claude-desktop config (foreman + ops continue using upstream forgejo-mcp for MCP-via-API convenience).

References

  • specs/forge-mcp-multi-forge.md §Story FM-3
  • apps/server/src/infrastructure/agent-env-sync/render-for-instance.ts
  • Dockerfile, patches/ — to be cleaned up
  • Depends on FM-1, FM-2.
## User story As a platform engineer, I want every agent skill, image, and config switched from `mcp__forgejo__*` (upstream binary) to `mcp__forge__*` (our wrapper), so that the upstream binary + `patches/` directory disappear from this repo and we own the entire forge-MCP surface. ## Acceptance criteria ### Skill rewrites - [ ] Every `/skills/*.md` file is rewritten to call `mcp__forge__*` tools. `git grep "mcp__forgejo__"` under `/skills/` returns zero hits. - [ ] One-time grep + sed pass applies the rename table: - `get_issue_by_index` → `get_issue` - `list_repo_issues` → `list_issues` - `list_issue_comments` → `list_comments` - `create_issue_comment` → `create_comment` - `create_review_requests` → `request_reviewers` - `delete_review_requests` → `remove_review_request` - `submit_pull_review` → `submit_review` - `get_pull_request_by_index` → `get_pull_request` - `list_repo_pull_requests` → `list_pull_requests` - (full table in the migration commit message for review) - [ ] Skills calling dropped tools (notifications, org admin, branch/repo CRUD, search) are rewritten to use surviving equivalents or fail loudly so the loss is visible. ### Image rebuild - [ ] `Dockerfile` drops the multi-stage `forgejo-mcp` build. The `patches/` directory is deleted. `claude-hooks:dev` rebuild produces a smaller image with no Go toolchain in the build stage. - [ ] `apps/forge-mcp` build artifact is copied in at `/usr/local/bin/forge-mcp`. - [ ] `config/mcp-builtin.json` carries exactly one entry: `forge`, command `forge-mcp`, transport `stdio`. (Per-type shape from `specs/drop-default-builtins.md` if that spec ships first; legacy single-entry shape otherwise.) ### Agent-env-sync wiring - [ ] `agent-env-sync.renderForInstance` injects `FORGE_TYPE`, `FORGE_REPO`, `FORGE_TOKEN` into the rendered `.claude.json::mcpServers.forge.env` per dispatch. - [ ] For multi-repo dispatches (foreman cross-repo edits), `FORGE_TOKENS` (plural JSON) is rendered with the per-forge token map. ### Memory + docs - [ ] `~/.claude/projects/.../memory/mcp_merge_bug.md` is deleted (the patches it documented no longer exist). - [ ] New `docs/forge-mcp.md` documents the tool surface, env contract, and per-forge differences (e.g. GitLab approve-only review). - [ ] `docs/credentials.md` updated: `FORGE_TOKEN` env var replaces `FORGEJO_ACCESS_TOKEN` for agent containers. - [ ] `~/.claude/CLAUDE.md` reference to `forgejo-mcp` under "Forgejo / issue tracking" updated to `forge-mcp` once cut over. ### Verification - [ ] Boss agent dispatches a real PR through the boss → reviewer → merge loop on `charles/claude-hooks` (Forgejo) using only `mcp__forge__*` calls. Loop closes successfully. - [ ] Same loop on a GitLab test repo (gates on FM-4 standing one up — coordinate or stub). ## Out of scope - `recommended-catalog.json` for non-builtin MCPs (covered in `specs/drop-default-builtins.md`). - The host's claude-desktop config (foreman + ops continue using upstream `forgejo-mcp` for MCP-via-API convenience). ## References - `specs/forge-mcp-multi-forge.md` §Story FM-3 - `apps/server/src/infrastructure/agent-env-sync/render-for-instance.ts` - `Dockerfile`, `patches/` — to be cleaned up - Depends on **FM-1**, **FM-2**.
Sign in to join this conversation.
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.

Reference
charles/claude-hooks#654
No description provided.