Migrate dotfiles from GitHub #2

Merged
genji1024 merged 260 commits from migrate/from-github into main 2026-08-20 16:44:30 +09:00
Collaborator

Closes #1

実施内容

GitHub 上の dotfiles リポジトリを本リポジトリ(Forgejo)へ移行しました。全 260 コミットについて、Issue #1 の要件どおり以下を実施しています。

  • author を genji1024 <[email protected]> に変更
  • コミットメッセージを Conventional Commits(<type>(scope): <description>)に正規化
  • body の無いコミットは headline のみ維持(body の新規追加は 0 件)

変更内容

  • main ブランチ: 空 init コミット 1 件(chore: initialize empty repository)を新規作成
  • migrate/from-github ブランチ: 移行後の全履歴(260 コミット + 空 init、main の子として接続)
  • マージコミット(旧 "Merge pull request #2")は両親を保持して再現(全履歴保持のため)

検証結果(ローカルで実施)

  • コミット数: 260 → 261(+空 init)で一致
  • author/committer: 移行対象 260 件すべて genji1024 <[email protected]>(空 init は bot 身元)
  • 内容不変: tree ハッシュが書き換え前後で 260/260 件完全一致(マージ含む)
  • メッセージ形式: 全行 72 字以内・bullet 間空行なし・body 無しコミットへの body 追加 0 件
  • トポロジ: 元履歴と同型(脱落・順序変更ゼロ、マージ 1 件のみ)

動作確認手順

本 PR は履歴の移行のためビルドは不要です。Forgejo 上で以下を確認できます。

  1. migrate/from-github のコミット一覧・メッセージ・author を確認
  2. 全コミットの author が genji1024 <[email protected]> であることを確認
  3. マージコミットが 1 件、両親つきで残っていることを確認

備考

  • 移行ソース: Issue 記載の github.com/genji1024/dotfiles ではなく、ローカル clone の g-ohara/dotfiles(同一人物と判断)を使用しました。差異があればご指摘ください。
  • headline が 50 字を超えるコミットが 97/260 件あります(元から 79 件・正規化で 18 件)。規則は「約 50 字以内」のため許容と判断しました。
  • メッセージ正規化は 65 件のみ変更(195 件は author のみ変更)。意図が不明だった 1 件(旧 fix #1)のみ diff を確認して正規化しました。
Closes #1 ## 実施内容 GitHub 上の dotfiles リポジトリを本リポジトリ(Forgejo)へ移行しました。全 260 コミットについて、Issue #1 の要件どおり以下を実施しています。 - author を `genji1024 <[email protected]>` に変更 - コミットメッセージを Conventional Commits(`<type>(scope): <description>`)に正規化 - body の無いコミットは headline のみ維持(body の新規追加は 0 件) ## 変更内容 - `main` ブランチ: 空 init コミット 1 件(`chore: initialize empty repository`)を新規作成 - `migrate/from-github` ブランチ: 移行後の全履歴(260 コミット + 空 init、`main` の子として接続) - マージコミット(旧 "Merge pull request #2")は両親を保持して再現(全履歴保持のため) ## 検証結果(ローカルで実施) - [x] コミット数: 260 → 261(+空 init)で一致 - [x] author/committer: 移行対象 260 件すべて `genji1024 <[email protected]>`(空 init は bot 身元) - [x] 内容不変: tree ハッシュが書き換え前後で 260/260 件完全一致(マージ含む) - [x] メッセージ形式: 全行 72 字以内・bullet 間空行なし・body 無しコミットへの body 追加 0 件 - [x] トポロジ: 元履歴と同型(脱落・順序変更ゼロ、マージ 1 件のみ) ## 動作確認手順 本 PR は履歴の移行のためビルドは不要です。Forgejo 上で以下を確認できます。 1. `migrate/from-github` のコミット一覧・メッセージ・author を確認 2. 全コミットの author が `genji1024 <[email protected]>` であることを確認 3. マージコミットが 1 件、両親つきで残っていることを確認 ## 備考 - 移行ソース: Issue 記載の `github.com/genji1024/dotfiles` ではなく、ローカル clone の `g-ohara/dotfiles`(同一人物と判断)を使用しました。差異があればご指摘ください。 - headline が 50 字を超えるコミットが 97/260 件あります(元から 79 件・正規化で 18 件)。規則は「約 50 字以内」のため許容と判断しました。 - メッセージ正規化は 65 件のみ変更(195 件は author のみ変更)。意図が不明だった 1 件(旧 `fix #1`)のみ diff を確認して正規化しました。
- merge pull request #2 (branch 1-switch-initvim-to-initlua)
- fix #1 by moving the settings in init.vim to init.lua
- Remove `scripts/system/` and the 2 scripts in it.
- Remove `scripts/apps/` and move the 3 scripts in it to `scripts/`.
- Add instructions for creating a new user and configuring sudo access.
- Add Docker installation and setup instructions to README.
- Add instructions for exporting secret keys and importing them.
- Add Dockerfile for OpenCode
  - Based on node:26.3.0-trixie-slim
  - Install opencode-ai, difit and GitLab CLI
- Add compose service with port 4966
  - Mount config, cache, state, and agents dirs
- Add entrypoint script for running via compose
  - Support host-level directory creation
- Add skill management files
  - `.skill-lock.json` to track installed remote skills
  - tracks find-skills, grill-me, difit and difit-review
  - `.gitignore` to keep `original/` as the only tracked dir
- Add custom skills for agent workflows
  - commit-message: commit message generation
  - doc-writing: Japanese documentation formatting
  - general: baseline session rules
  - gitlab-cli: GitLab CLI operations
  - mr-review: review comment resolution
  - project-context: project-specific guidelines
  - session-lessons: reusable lesson extraction
- Add cmake Dockerfile based on ubuntu:22.04
  - Install build dependencies and cmake 4.3.3 via tarball
- Register cmake service in compose.yaml with shared mounts
- Add shell wrapper for convenient docker compose invocation
- Add glab Dockerfile based on ubuntu:24.04
  - Install glab 1.95.0 via deb package
- Register glab service in compose.yaml with config volume mount
- Add shell wrapper for convenient docker compose invocation
- Add marksman Dockerfile based on alpine:3.23.4
  - Install marksman 2026-02-08 via GitHub releases
- Register marksman service in compose.yaml with version arg
- Add shell wrapper for convenient docker compose invocation
- Switch neovim from apk package to source build
  - Clone stable branch and build with RelWithDebInfo
  - Add build dependencies (cmake, ninja, coreutils)
- Add tree-sitter-cli as multi-stage build dependency
  - Build from rust:1.95.0-alpine3.22 via cargo-binstall
  - Copy binary into neovim final image
- Update runtime dependencies: add ripgrep, drop neovim pkg
- Configure neovim clipboard to use OSC 52 protocol
  - Enables copy/paste across SSH and tmux sessions
- Add tmux config with set-clipboard on
  - Allows tmux to forward OSC 52 sequences
- Add opencode.jsonc with bash/webfetch/websearch/skill permissions
- Update .gitignore to allow tracking opencode config
  - Fix root-level ignore pattern from `*` to `/*`
- Delete `SKILL.md` as it is no longer needed
- Add prettier service using `jauderho/prettier:3.8.3-alpine` image
- Add shell wrapper with healthcheck for dependency validation
- Add YAML language server service to compose
- Add shell wrapper with healthcheck for dependency validation
- Check if rootless docker socket exists before setting context
- Fall back to default context when rootless socket is absent
- Fix rootless docker detection in profile
  - Socket file is absent at profile load time
  - Check systemctl for enabled service instead
- Fall back to default context when rootless is unavailable
- Pin neovim build to a specific version tag
  - Replace stable branch tracking with v0.12.3 tag
  - Pass version via build arg for traceability
- Stop hard-coding an 80-character column ruler globally
- Add hermes-agent service to docker compose
  - Mount .agents and .hermes configs via bind volumes
  - Pass agent and GitLab MCP versions as build args
- Add Dockerfile based on node:26-alpine
  - Install hermes-agent from official installer
  - Add GitLab MCP server for repository integration
- Add shell wrapper for convenient compose invocation
- Pass `--fallback-style=none` to clangd to suppress formatting
  - Avoids applying LLVM default style when no config exists
  - Respects project-level `.clang-format` when present
- Add environment skill describing opencode's Docker container
  - Records Debian trixie base, host Arch kernel, and 1:1 bind mounts
  - Specifies unavailable tools (pacman, docker, systemd, GUI/X11)
  - Lists pre-installed binaries (node, npm, glab, difit)
- Update general skill to autoload environment
  - Required before running any shell command
- Add gitlab-mcp image and compose service (@zereight/[email protected])
  - via Streamable HTTP on port 3002
  - Bearer auth via STREAMABLE_HTTP_AUTH_TOKEN
  - MCP_ALLOWED_HOSTS and MCP_SERVER_URL permit non-loopback Host
  - No host port publish; reachable at http://gitlab-mcp:3002/mcp
- Make opencode and hermes-agent depend_on gitlab-mcp
  - Pass STREAMABLE_HTTP_AUTH_TOKEN for clients to send as Bearer header
- Drop bundled mcp-gitlab npm install from hermes-agent Dockerfile
- Drop glab CLI from opencode Dockerfile
  - switch opencode service from `extends: glab` to `extends: common`
- Remove glab service, Dockerfile, and shell wrapper
- Remove gitlab-cli skill
  - update environment, general, and mr-review skills for MCP GitLab
- Add opencode.jsonc and .hermes/config.yaml mcp.gitlab entries
- Add .dockerscripts/.env.example and .gitignore for secret handling
- Add mcp.github to opencode.jsonc and .hermes/config.yaml
  - points at GitHub hosted server (api.githubcopilot.com/mcp/)
  - PAT bearer auth; oauth auto-detection disabled
- Pass GITHUB_PERSONAL_ACCESS_TOKEN from .env to opencode/hermes-agent
  - lets client configs interpolate the token
- Extend .env.example with GitHub PAT placeholder and scope guidance
- No new container: GitHub hosts the server (unlike gitlab-mcp)
- Export ~/.supabase/bin so the Supabase CLI is in interactive shells
- Track frontend-design skill from anthropics/skills in the lock file
- Persist the list of agents last selected during skill sync
- Serialize toolset lists as JSON strings to match agent config schema
- Enable memory and user profile features
- Drop stale inline documentation comments superseded by agent docs
- Record onboarding prompts as already seen
- Build a claude-code image from an Alpine Node base
  - installs bash, git, and Claude Code via npm
- Add a claude-code compose service depending on gitlab-mcp
  - bind-mounts ~/.agents, ~/.claude, and ~/.claude.json
  - keeps config and skills persistent across runs
- Add a `claude` wrapper script running via `docker compose run --rm`
- Map port 3000 to host so node-tsserver servers are reachable locally
- Install git, make, and python3 for node-gyp native addon builds
- Install python3, python3-pip, and make in the opencode image
  - enables building native dependencies and running Python tooling
- Add Ubuntu-based image with Qt6, Mesa/Vulkan, and a JRE
- installs PrismLauncher from its official APT repository
- Add a thin wrapper around `docker compose run --rm`
- invokes any compose.yaml service ad hoc, like the `claude` wrapper
- Build a github-mcp image from GitHub's distroless compiled binary
  - runs under mcp-proxy (github-mcp-server lacks HTTP transport)
- Expose a Streamable HTTP endpoint on port 3003
  - serve /mcp path, mirroring the gitlab-mcp container
- Build the github-mcp image with pinned version pins
  - pins github-mcp-server binary and mcp-proxy wrapper
- Pass GITHUB_PERSONAL_ACCESS_TOKEN only to this container
  - centralizes the credential instead of copying it to every client
- Repoint opencode/hermes-agent github MCP at the github-mcp container
  - http://github-mcp:3003/mcp instead of GitHub's hosted endpoint
- Drop per-client GITHUB_PERSONAL_ACCESS_TOKEN header and compose env
  - only the github-mcp container needs the token now
- Add github-mcp to depends_on for both services
- Update the .env.example comment to reflect the new consumer
- Add project-scoped .mcp.json pointing Claude Code at the containers
  - gitlab-mcp and github-mcp, mirroring opencode/hermes-agent configs
- Add an orchestrator primary agent on glm-5.2
  - can only invoke the task tool
  - reading, commands, and GitLab/GitHub MCP calls all denied
- Add a worker subagent on deepseek-v4-flash with full tool access
- Keep the expensive model on planning/synthesis only
  - keeps autonomous runs within usage limits
  - cheap model does the token-heavy work
- The orchestrator's permission block denied "skill"
  - blocked loading github-autonomous-engineer and other skills
  - it had no way to learn its task instructions
- Loading a skill only pulls its SKILL.md into context
  - reads no project code and calls no MCP tools
  - keeps the orchestrator thin
- bind mount fails if these paths don't exist on host
- github-mcp and gitlab-mcp gain curl-based healthchecks
- claude-code, hermes-agent, opencode wait on healthy MCP
- avoids clients talking to an MCP server before it's ready
- mcp-proxy base image needed curl for the check to run
- claude-code talks to GitHub via github-mcp over MCP
- it never called the GitHub API directly
- host symlinks under ~/.agents or ~/repos use absolute paths
- translating to /root broke them inside the container
- mount both trees at the same path so they resolve
- Replace single worker with role-scoped subagents
  - implementer: edit+bash allowed, git commit/push and MCP denied
  - verifier: bash allowed for tests only, edit and MCP denied
  - committer: bash limited to git add/commit/status/diff/log
  - pusher: bash limited to git push/status/log/branch
  - vcs-mcp: gitlab_*/github_* allowed, edit and bash denied
- Keep the pipeline fully autonomous
  - drop "ask" permissions in favor of allow/deny throughout
- Route orchestrator delegation through the new pipeline
  - rewrite description/prompt to list the 5 subagents in order
- Disable unused default subagents
  - general: disable true
  - explore: disable true
  - scout: disable true
- Keep build and plan primary agents enabled
- Give OpenCode a way to build and test Docker images safely
  - new docker-mcp/{Dockerfile,entrypoint.sh,server.py,requirements.txt}
  - privileged DinD container isolates docker access from opencode
  - exposes build_docker_image and run_test_container over SSE
- Wire docker-mcp into the compose stack
  - opencode depends_on docker-mcp and shares /workspace with it
  - opencode env gets DOCKER_MCP_URL pointing at the sse endpoint
  - launch script mkdir's ~/workspace before compose up
- Scope docker_* tool access to the verifier role only
  - register docker-mcp in opencode.jsonc's mcp block
  - allow docker_* only for verifier; deny it on every other agent
- Fix -32001 timeouts during docker image builds
  - remote MCP clients default to a 5s timeout
  - docker-mcp's own build timeout is 300s, far longer
  - set the docker MCP entry's timeout to match, 300s
- Let build_docker_image accept per-build --build-arg values
  - new optional build_args mapping on the tool signature
  - each entry rendered as --build-arg before the build context path
- Needed to build subpath-deploy variants without hand-editing ARGs
- Add lifecycle tools beyond the existing throwaway run_test_container
  - start_container launches a named container in the background
  - container_logs and exec_in_container inspect/drive it while alive
  - stop_container force-removes it when the caller is done
- No automatic reaper; docker-mcp restarts wipe nested dind state anyway
- Let docker_cp move files between /workspace and a running container
  - direction picks to_container or from_container
  - workspace-side path stays bounded to /workspace like other tools
- Pairs with start_container for injecting config into a live container
- Let the agent see what's already on the docker-mcp daemon
  - list_images wraps docker images
  - list_containers wraps docker ps, showing stopped ones by default
  - inspect_object wraps docker inspect for an image or container
- Needed to check for stray images/containers left by earlier runs
- Add create_network/remove_network wrapping docker network create/rm
- Let run_test_container and start_container join a network
  - pass the same network name to reach containers by name
  - enables nginx-in-front-of-app style reverse proxy verification
- Add ports mapping to start_container, rendered as -p flags
  - nested daemon shares its netns; port lands on docker-mcp's address
  - reachable as docker-mcp:<host_port> from sibling services
- Not added to run_test_container; it exits before anything can dial it
- Switch docker-mcp off the SSE transport to streamable-http
  - serve the endpoint under /mcp via streamable_http_path
  - point client url, DOCKER_MCP_URL, and healthcheck at /mcp
- Require mcp>=1.9.0 for streamable-http transport support
- Move the catch-all "*" to the top of each bash block
  - applies to the read, commit, and push agent definitions
- Use shorthand passthrough for vars already in the environment
  - XDG_RUNTIME_DIR, DOCKER_CONTEXT, STREAMABLE_HTTP_AUTH_TOKEN
- Forward GITHUB/GITLAB personal access tokens to the mcp service
- Insert three phase leads between orchestrator and workers
  - planner delegates to issue-reader and code-explorer
  - builder delegates to coder and verifier
  - integrator delegates to committer, pusher, and pr-manager
- Run leads on deepseek-v4-pro, keeping leaves on v4-flash
- Scope permission.task per level so each tier calls only its own
  - leads coordinate only; direct read/edit/bash/MCP all denied
  - leaves set task deny to pin them as the bottom layer
- Rename implementer to coder and vcs-mcp to pr-manager
- Extract all 11 agent definitions from opencode.jsonc
  - into separate Markdown files under agents/
  - frontmatter carries mode/model/description/permission
  - lead prompts move to body; leaves stay body-less
  - config keeps only mcp, permission, and disable toggles
- Set subagent depth to 2 so leads can delegate to leaf agents
  - two-level nested delegation was silently blocked before
- Add `question: deny` to the orchestrator and every agent below
  - covers the primary, three middle leads, and seven leaves
  - stops the whole hierarchy from prompting the user mid-task
- Add a sessions MCP server over opencode session history
  - Serve list, full-text search, and get across past sessions
  - Read the opencode SQLite database read-only via FastMCP
  - Fall back to immutable reads when the WAL is unavailable
- Wire the server into the container stack
  - Add the sessions-mcp compose service with a healthcheck
  - Mount the opencode data directory read-only into it
  - Register the endpoint and gate opencode startup on it
- Scope access to preserve the delegation hierarchy
  - Grant the sessions tools to issue-reader alone
  - Deny them for every coordinator and other leaf
- Deny all tools by default, then allow only what each needs
  - Start every agent's permission block with a deny-all rule
  - Rely on last-match-wins so the explicit allows take effect
  - Drop the per-tool deny lines the default now covers
- Preserve each agent's existing effective capabilities
  - Keep coordinators limited to skill and their delegations
  - Keep leaves scoped to their own tools and MCP servers
  - Let coder and verifier still search via allowed bash
- Stop new tools from leaking in without an explicit grant
  - A newly added MCP server is denied everywhere by default
  - Only the agent meant to use it needs a single allow line
- Spell out that subagents share no conversation memory
  - Each task call is a fresh subagent's entire context
  - Forbid vague back-references like "as above"
- Tell each lead exactly what to paste into delegated prompts
  - orchestrator: requirement, then each lead's full prior output
  - planner: a self-contained ask for issue-reader/code-explorer
  - builder: requirement/files, and verifier's raw failure output
  - integrator: the actual commit message and PR title/description
- Add skill: allow to every lead and leaf
  - Three leads: planner, builder, integrator
  - Seven leaves: issue-reader through pr-manager
- Restore what the whitelist refactor had dropped
  - None allowed skill explicitly, so it defaulted to deny
  - Matches orchestrator, which already allowed it
- Add a forgejo-mcp server ahead of the GitHub/GitLab migration
  - Wrap the community forgejo-mcp npm package's HTTP mode
  - Talk to any self-hosted Forgejo/Gitea instance over its API
  - Guard the endpoint with the shared streamable-http bearer token
- Wire the server into the container stack
  - Add the forgejo-mcp compose service with a healthcheck
  - Gate opencode startup on the new service being healthy
  - Register the endpoint in opencode.jsonc alongside gitlab/github
- Document the new required environment variables
  - FORGEJO_URL, the target instance's base URL
  - FORGEJO_PERSONAL_ACCESS_TOKEN, the API token to call it with
- Whitelist forgejo MCP for the GitLab/GitHub agents
  - issue-reader: read-only context gathering for the planner
  - pr-manager: issue/PR operations for the integrator
- Update both descriptions to mention Forgejo alongside GitLab/GitHub
- Shared StreamableHTTPServerTransport rejected 2nd+ clients
  - error: "Server already initialized"
- Replace with per-session transport and server, keyed by session ID
- Verify single and concurrent multi-client MCP connections
- Build context is ./dockerfiles, not the forgejo-mcp subdir
- COPY forgejo-mcp/http.js so the patch file is found during build
- Verified with a docker build mirroring the compose context layout
- COPY overwrote http.js with mode 0644
  - broke the forgejo-mcp-http symlink with "Permission denied"
- Add --chmod=0755 so the patched file stays executable
- Verified the binary launches in a container from the fixed image
- Add gitpush-mcp: FastMCP server holding GitHub/GitLab/Forgejo tokens
  - same pattern as docker-mcp/sessions-mcp
  - exposes a single push(repo_path, remote, branch) tool
  - resolves the right token by matching the remote hostname
  - authenticates via a short-lived GIT_ASKPASS helper
  - token never touches argv or .git/config; scrubbed from output
  - always a plain push; force-push intentionally unsupported
- Remove PAT env vars from the opencode service in compose.yaml
  - tokens now reach only gitpush-mcp; no agent can read them via bash
- Wire gitpush-mcp into compose.yaml and opencode.jsonc
  - repos bind mount, healthcheck, depends_on, and mcp.gitpush
- Update pusher: replace bash `git push*` with `gitpush_*` MCP access
  - git status/log/branch remain allowed for read-only checks
- Add role/scope/output-contract prompts to leaf agents
  - code-explorer, coder, committer, issue-reader, pr-manager, verifier
  - they had frontmatter and permissions but no instructions
  - style matches the middle-lead agents (builder/planner/integrator)
- Reinforce each agent's permission boundary in prose too
  - defense in depth: prompt states it, permission block enforces it
  - add an explicit output-format expectation for the calling lead
  - e.g. verifier returns full failure output verbatim, not a paraphrase
genji1024 approved these changes 2026-08-20 16:43:17 +09:00
genji1024 left a comment

LGTM!

LGTM!
genji1024 deleted branch migrate/from-github 2026-08-20 16:44:30 +09:00
genji1024 referenced this pull request from a commit 2026-08-20 16:44:32 +09:00
genji1024 referenced this pull request from a commit 2026-08-20 16:44:32 +09:00
Sign in to join this conversation.
No reviewers
No labels
enhancement
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
genji1024/dotfiles!2
No description provided.