Files
keyhunter/.planning/phases/04-input-sources/04-01-PLAN.md
2026-04-06 12:27:23 +03:00

115 lines
3.6 KiB
Markdown

---
phase: 04-input-sources
plan: 01
type: execute
wave: 0
depends_on: []
files_modified:
- go.mod
- go.sum
autonomous: true
requirements: []
must_haves:
truths:
- "go-git/v5, atotto/clipboard, x/exp/mmap are available as imports"
- "go build ./... succeeds with new dependencies"
artifacts:
- path: "go.mod"
provides: "Module declarations for go-git, clipboard, and x/exp"
contains: "github.com/go-git/go-git/v5"
- path: "go.sum"
provides: "Checksums for added dependencies"
key_links:
- from: "go.mod"
to: "module cache"
via: "go mod tidy"
pattern: "go-git/go-git/v5"
---
<objective>
Add the three external Go dependencies that Phase 4 input sources require:
- `github.com/go-git/go-git/v5` — git history traversal (INPUT-02)
- `github.com/atotto/clipboard` — cross-platform clipboard access (INPUT-05)
- `golang.org/x/exp/mmap` — memory-mapped large file reads (CORE-07)
Purpose: Wave 0 dependency bootstrap so the parallel source implementation plans (04-02, 04-03, 04-04) compile cleanly on first attempt with no dependency resolution thrash.
Output: Updated go.mod and go.sum with all three modules resolved.
</objective>
<execution_context>
@$HOME/.claude/get-shit-done/workflows/execute-plan.md
@$HOME/.claude/get-shit-done/templates/summary.md
</execution_context>
<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/04-input-sources/04-CONTEXT.md
@go.mod
</context>
<tasks>
<task type="auto">
<name>Task 1: Add go-git, clipboard, and x/exp/mmap dependencies</name>
<read_first>
- go.mod
- .planning/phases/04-input-sources/04-CONTEXT.md
</read_first>
<files>go.mod, go.sum</files>
<action>
Run the following commands from the repo root in order:
```bash
go get github.com/go-git/go-git/v5@latest
go get github.com/atotto/clipboard@latest
go get golang.org/x/exp/mmap@latest
go mod tidy
go build ./...
```
Verify the `require` block in go.mod now contains direct entries (non-indirect) for:
```
github.com/go-git/go-git/v5 vX.Y.Z
github.com/atotto/clipboard vX.Y.Z
golang.org/x/exp vYYYYMMDD-hash
```
If `go build ./...` fails, do NOT try to fix anything beyond the dependency graph — unrelated build failures must be surfaced. If `go mod tidy` moves a module to indirect, that is acceptable only if no source file yet imports it; the follow-on plans in Wave 1 will promote them to direct.
Do NOT modify any source files in this plan. This is dependency bootstrap only.
</action>
<verify>
<automated>go build ./... && grep -E "go-git/go-git/v5|atotto/clipboard|golang.org/x/exp" go.mod</automated>
</verify>
<acceptance_criteria>
- `grep "github.com/go-git/go-git/v5" go.mod` returns a match
- `grep "github.com/atotto/clipboard" go.mod` returns a match
- `grep "golang.org/x/exp" go.mod` returns a match
- `go build ./...` exits 0
- `go.sum` contains entries for all three modules
</acceptance_criteria>
<done>All three new modules are present in go.mod, go.sum has their checksums, and `go build ./...` succeeds.</done>
</task>
</tasks>
<verification>
- `go build ./...` succeeds
- `go vet ./...` succeeds
- `grep -c "go-git/go-git/v5\|atotto/clipboard\|golang.org/x/exp" go.mod` returns 3 or more
</verification>
<success_criteria>
Dependencies resolved and build is green. Wave 1 plans can import from these modules without needing their own `go get` calls.
</success_criteria>
<output>
After completion, create `.planning/phases/04-input-sources/04-01-SUMMARY.md` with:
- Resolved version numbers for the three modules
- Any warnings from `go mod tidy`
- Confirmation that `go build ./...` passed
</output>