# Structure Experiment Loop — Go

Extends `../shared/experiment-loop-base.md` with Go structure-specific steps.

## Domain-Specific Additions

**Step 1 — Baseline**: Measure build time (`time go build ./...`), startup time (if CLI), dependency count, init() function count, CGo package count.

**Step 3 — Reasoning checklist**: Is this init() doing I/O? Is this dependency replaceable with stdlib? Is this CGo call replaceable with pure Go?

**Step 9 — Benchmark**: Re-measure build time, startup time. Compare dependency counts.

**Step 10 — Guard**: `go test ./...` and `go vet ./...`.

## Keep Thresholds

- **Build time**: ≥10% reduction
- **Startup time**: ≥10% reduction
- **Dependency removal**: KEEP (reduces attack surface and build time)
- **init() deferral**: KEEP if behavior-preserving (correctness improvement)
- **CGo elimination**: KEEP (reduces build complexity and runtime overhead)

## Plateau

- No more init() functions with I/O
- No more replaceable CGo dependencies
- No more unused dependencies
- Build time dominated by project code, not dependencies
