experiment: make precommit always on
Remove the precommit experiment flag and make commit message style guidance
always available when using the precommit tool.
Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/loop/agent.go b/loop/agent.go
index 5b63dee..b5de370 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -993,10 +993,7 @@
}
func (a *Agent) precommitTool() *llm.Tool {
- description := `Creates a git branch for tracking work. MANDATORY: You must use this tool before making any git commits.`
- if experiment.Enabled("precommit") {
- description = `Creates a git branch for tracking work and provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.`
- }
+ description := `Creates a git branch for tracking work and provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.`
preCommit := &llm.Tool{
Name: "precommit",
Description: description,
@@ -1037,14 +1034,12 @@
a.SetBranch(branchName)
response := fmt.Sprintf("Branch name set to %q", branchName)
- if experiment.Enabled("precommit") {
- styleHint, err := claudetool.CommitMessageStyleHint(ctx, a.repoRoot)
- if err != nil {
- slog.DebugContext(ctx, "failed to get commit message style hint", "err", err)
- }
- if len(styleHint) > 0 {
- response += "\n\n" + styleHint
- }
+ styleHint, err := claudetool.CommitMessageStyleHint(ctx, a.repoRoot)
+ if err != nil {
+ slog.DebugContext(ctx, "failed to get commit message style hint", "err", err)
+ }
+ if len(styleHint) > 0 {
+ response += "\n\n" + styleHint
}
return response, nil