diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76522ee5..3689cdd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: git config --global user.name "CI Bot" git config --global user.email "ci@gastown.test" + - name: Generate embedded files + run: go generate ./internal/formula/... + - name: Build run: go build -v ./cmd/gt @@ -66,6 +69,9 @@ jobs: with: go-version: '1.24' + - name: Generate embedded files + run: go generate ./internal/formula/... + - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: @@ -91,6 +97,9 @@ jobs: - name: Install beads (bd) run: go install github.com/steveyegge/beads/cmd/bd@latest + - name: Generate embedded files + run: go generate ./internal/formula/... + - name: Build gt run: go build -v -o gt ./cmd/gt diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 72b54c50..e5012478 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -29,8 +29,17 @@ jobs: git config --global user.name "CI Bot" git config --global user.email "ci@gastown.test" + - name: Install beads (bd) + run: go install github.com/steveyegge/beads/cmd/bd@latest + + - name: Add to PATH + run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Generate embedded files + run: go generate ./internal/formula/... + - name: Build run: go build -v ./cmd/gt - name: Run integration tests - run: go test -v -tags=integration -timeout=4m ./... + run: go test -v -tags=integration -timeout=4m ./internal/cmd/... diff --git a/internal/cmd/install.go b/internal/cmd/install.go index f62bc547..61c25c7d 100644 --- a/internal/cmd/install.go +++ b/internal/cmd/install.go @@ -11,6 +11,7 @@ import ( "github.com/spf13/cobra" "github.com/steveyegge/gastown/internal/beads" + "github.com/steveyegge/gastown/internal/claude" "github.com/steveyegge/gastown/internal/config" "github.com/steveyegge/gastown/internal/deps" "github.com/steveyegge/gastown/internal/formula" @@ -178,6 +179,15 @@ func runInstall(cmd *cobra.Command, args []string) error { fmt.Printf(" ✓ Created CLAUDE.md\n") } + // Ensure Mayor has Claude settings with SessionStart hooks. + // This ensures gt prime runs on Claude startup, which outputs the Mayor + // delegation protocol - critical for preventing direct implementation. + if err := claude.EnsureSettingsForRole(absPath, "mayor"); err != nil { + fmt.Printf(" %s Could not create .claude/settings.json: %v\n", style.Dim.Render("⚠"), err) + } else { + fmt.Printf(" ✓ Created .claude/settings.json\n") + } + // Initialize town-level beads database (optional) // Town beads (hq- prefix) stores mayor mail, cross-rig coordination, and handoffs. // Rig beads are separate and have their own prefixes.