refactor: hoist Go module from go/ to repo root#162
Merged
Conversation
The /go/ subdirectory was a relic of the Java/Go coexistence period. Phase 6 cutover (#132) deleted the Java side a month ago, leaving the Go module stranded one level deep. That cost the project a clean `go install` story: users had to type `github.com/randomcodespace/codeiq/go/cmd/codeiq@v0.3.x` and pseudo- version resolution kicked in because there were no `go/vX.Y.Z` tags. This commit moves the module to the repo root so: - `go install github.com/randomcodespace/codeiq/cmd/codeiq@v0.3.x` resolves directly to the matching `vX.Y.Z` tag (no `/go/` suffix, no separate tag namespace). - `cd codeiq && go build ./cmd/codeiq` Just Works. - Standard Go project layout — what every contributor expects. ### What moved - `go/cmd/` → `cmd/` - `go/internal/` → `internal/` - `go/testdata/` → `testdata/` - `go/parity/` → `parity/` - `go/go.mod` → `go.mod` (module path drops `/go`) - `go/go.sum` → `go.sum` - `go/.gitignore` → merged into root `.gitignore` `git mv` was used for every tracked path so `git log --follow` history survives the rename. ### Mechanical rewrites - 320 Go files: import path `github.com/randomcodespace/codeiq/go/...` → `github.com/randomcodespace/codeiq/...` - 5 CI workflows: dropped `working-directory: go`, `cache-dependency-path: go/go.sum`, `cd go &&` wrappers, and the `go/cmd go/internal` jscpd target prefix. - `.goreleaser.yml`: dropped `dir: go` from each build, removed `cd go &&` from the `before:` hooks, updated all `-X …/go/internal/buildinfo.*` ldflags to the new path. - `.github/dependabot.yml`: `directory: "/go"` → `directory: "/"`. - README: replaced `cd codeiq/go` with `cd codeiq`; added an explicit `go install` example targeting the now-root-level path. - CLAUDE.md, PROJECT_SUMMARY.md, AGENTS.md: directory map + module-path callouts updated. ### Tests + verification - `CGO_ENABLED=1 go build ./...` — clean. - `CGO_ENABLED=1 go test ./... -count=1` — full suite passes, 0 FAIL across 41 test-bearing packages. - Smoke on `testdata/fixture-minimal`: - `index` exits 0 (5 files / 44 nodes / 24 edges). - `enrich` exits 0 (45 nodes / 68 edges / 1 service / FTS indexed). Historical `docs/superpowers/plans/*.md` keep their original `go/internal/...` references — those are point-in-time snapshots, not living docs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
aksOps
added a commit
that referenced
this pull request
May 14, 2026
Move the contents of [Unreleased] under a new [v0.4.0] - 2026-05-14 heading. Repopulate [Unreleased] with the three post-v0.4.0 items already on main: #163 (pflag bump), #164 (harden-runner bump), #165 (release-darwin race fix). Add a header note explaining the release-history reset: deleting the pre-v0.4.0 tags from GitHub does not delete them from proxy.golang.org; every reused tag name would serve the old (often Python-era) content. v0.4.0 is the first never-previously-used version. Two factual additions to v0.4.0: * PR #162 (module hoist) — was missing from the original Changed block when the section was still labelled [Unreleased]. * PR #161 (BuildInfo fallback) — moved into a dedicated Added bullet so `go install` users know their binaries self-identify now. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The `/go/` subdirectory was a relic of the Java/Go coexistence period. Phase 6 cutover (#132) deleted the Java side a month ago, leaving the Go module stranded one level deep. That cost the project a clean `go install` story: users had to type `github.com/randomcodespace/codeiq/go/cmd/codeiq@v0.3.x` and pseudo-version resolution kicked in because there were no `go/vX.Y.Z` tags.
This PR moves the module to the repo root.
After this lands
```bash
Direct install, resolves to v0.3.x tag — no /go suffix, no separate tag namespace.
go install github.com/randomcodespace/codeiq/cmd/codeiq@v0.3.0
```
What moved
All renames done via `git mv` so `git log --follow` works.
Mechanical rewrites
Historical `docs/superpowers/plans/*.md` keep their original `go/internal/...` references — point-in-time snapshots, not living docs.
Test plan
Notes for future tagging
Once this merges, the next release tag (`v0.3.1` / `v0.4.0` / whatever) will resolve cleanly for `go install`. The pre-existing top-level tags (`v0.3.0`, `v0.2.x`, `v0.0.1-beta.*`) point at commits where the module was still at `go/` — `go install ...@v0.3.0` from before this PR will still work the old way; from after this PR you'd want to bump.
🤖 Generated with Claude Code