on main help sign in
chore(attribution): default to assisted-by + email (#1444)
commit9d70d1d18c731fcbd584eefc769ea30bd09a8436 authorAmolith <amolith@secluded.site> dateMon 17 Nov 2025, 07:28 (1 year ago) parentf6186cb
6 files changed+21−14
README.md+8−5 internal/agent/tools/bash.tpl+1−1 internal/config/attribution_migration_test.go+2−2 internal/config/config.go+1−1 internal/config/load.go+8−4 schema.json+1−1
README.md+8−5
@@ -374,11 +374,14 @@ it creates. You can customize this behavior with the `attribution` option:
374374}
375375```
376376
377−- `trailer_style`: Controls the attribution trailer added to commit messages (default: `co-authored-by`)
378− - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
379− - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush` (includes the model name)
380− - `none`: No attribution trailer
381−- `generated_with`: When true (default), adds `💘 Generated with Crush` line to commit messages and PR descriptions
377+- `trailer_style`: Controls the attribution trailer added to commit messages
378+ (default: `assisted-by`)
379+ - `assisted-by`: Adds `Assisted-by: [Model Name] via Crush <crush@charm.land>`
380+ (includes the model name)
381+ - `co-authored-by`: Adds `Co-Authored-By: Crush <crush@charm.land>`
382+ - `none`: No attribution trailer
383+- `generated_with`: When true (default), adds `💘 Generated with Crush` line to
384+ commit messages and PR descriptions
382385
383386### Custom Providers
384387
internal/agent/tools/bash.tpl+1−1
@@ -69,7 +69,7 @@ When user asks to create git commit:
6969{{ end}}
7070{{if eq .Attribution.TrailerStyle "assisted-by" }}
7171
72− Assisted-by: {{ .ModelName }} via Crush
72+ Assisted-by: {{ .ModelName }} via Crush <crush@charm.land>
7373{{ else if eq .Attribution.TrailerStyle "co-authored-by" }}
7474
7575 Co-Authored-By: Crush <crush@charm.land>
internal/config/attribution_migration_test.go+2−2
@@ -66,7 +66,7 @@ func TestAttributionMigration(t *testing.T) {
6666 }
6767 }
6868 }`,
69− expectedTrailer: TrailerStyleCoAuthoredBy,
69+ expectedTrailer: TrailerStyleAssistedBy,
7070 expectedGenerate: true,
7171 },
7272 {
@@ -74,7 +74,7 @@ func TestAttributionMigration(t *testing.T) {
7474 configJSON: `{
7575 "options": {}
7676 }`,
77− expectedTrailer: TrailerStyleCoAuthoredBy,
77+ expectedTrailer: TrailerStyleAssistedBy,
7878 expectedGenerate: true,
7979 },
8080 }
internal/config/config.go+1−1
@@ -177,7 +177,7 @@ const (
177177)
178178
179179type Attribution struct {
180− TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=co-authored-by"`
180+ TrailerStyle TrailerStyle `json:"trailer_style,omitempty" jsonschema:"description=Style of attribution trailer to add to commits,enum=none,enum=co-authored-by,enum=assisted-by,default=assisted-by"`
181181 CoAuthoredBy *bool `json:"co_authored_by,omitempty" jsonschema:"description=Deprecated: use trailer_style instead"`
182182 GeneratedWith bool `json:"generated_with,omitempty" jsonschema:"description=Add Generated with Crush line to commit messages and issues and PRs,default=true"`
183183}
internal/config/load.go+8−4
@@ -353,15 +353,19 @@ func (c *Config) setDefaults(workingDir, dataDir string) {
353353
354354 if c.Options.Attribution == nil {
355355 c.Options.Attribution = &Attribution{
356− TrailerStyle: TrailerStyleCoAuthoredBy,
356+ TrailerStyle: TrailerStyleAssistedBy,
357357 GeneratedWith: true,
358358 }
359359 } else if c.Options.Attribution.TrailerStyle == "" {
360360 // Migrate deprecated co_authored_by or apply default
361− if c.Options.Attribution.CoAuthoredBy != nil && !*c.Options.Attribution.CoAuthoredBy {
362− c.Options.Attribution.TrailerStyle = TrailerStyleNone
361+ if c.Options.Attribution.CoAuthoredBy != nil {
362+ if *c.Options.Attribution.CoAuthoredBy {
363+ c.Options.Attribution.TrailerStyle = TrailerStyleCoAuthoredBy
364+ } else {
365+ c.Options.Attribution.TrailerStyle = TrailerStyleNone
366+ }
363367 } else {
364− c.Options.Attribution.TrailerStyle = TrailerStyleCoAuthoredBy
368+ c.Options.Attribution.TrailerStyle = TrailerStyleAssistedBy
365369 }
366370 }
367371 if c.Options.InitializeAs == "" {
schema.json+1−1
@@ -13,7 +13,7 @@
1313 "assisted-by"
1414 ],
1515 "description": "Style of attribution trailer to add to commits",
16− "default": "co-authored-by"
16+ "default": "assisted-by"
1717 },
1818 "co_authored_by": {
1919 "type": "boolean",