Files
mijia-go-api/docs/compose/plans/2026-07-18-initialize-git-repository.md
T
2026-07-18 22:40:40 +08:00

1.5 KiB

Initialize Git Repository Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use compose:subagent (recommended) or compose:execute to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Initialize the Go library as a Git repository and publish its first commit to git.misaka.ren.

Architecture: Track the root Go module as the repository. Exclude local MiMoCode state, authentication data, generated MIoT cache data, and the nested Python reference repository.

Tech Stack: Git, Go 1.22+

Global Constraints

  • Use https://git.misaka.ren/m1saka/mijia-go-api.git as origin.
  • Keep mijia-api/ untracked.
  • Use feat: add Go API library as the initial commit message.

Task 1: Initialize And Publish Repository

Files:

  • Create: .gitignore

  • Step 1: Verify the Go library

Run: go test ./... Expected: all packages pass.

  • Step 2: Initialize the repository

Run: git init -b main Expected: an empty Git repository on branch main.

  • Step 3: Configure the remote

Run: git remote add origin https://git.misaka.ren/m1saka/mijia-go-api.git Expected: origin points to the target repository.

  • Step 4: Create the initial commit

Run: git add . && git commit -m "feat: add Go API library" Expected: one root commit containing the Go library and documentation, excluding ignored local data.

  • Step 5: Publish and verify

Run: git push -u origin main Expected: main tracks origin/main and the worktree is clean.