LooksBoilerplate reports whether the config resembles a bare bootstrap. This intentionally treats extension-only configs as a first draft that should usually be tuned with project-specific excludes or policy.
()
| 136 | // This intentionally treats extension-only configs as a first draft that |
| 137 | // should usually be tuned with project-specific excludes or policy. |
| 138 | func (c ProjectConfig) LooksBoilerplate() bool { |
| 139 | if c.IsZero() { |
| 140 | return false |
| 141 | } |
| 142 | if len(c.Exclude) > 0 { |
| 143 | return false |
| 144 | } |
| 145 | if strings.TrimSpace(c.Mode) != "" { |
| 146 | return false |
| 147 | } |
| 148 | if c.Budgets.SessionStartBytes > 0 || c.Budgets.DiffBytes > 0 || c.Budgets.MaxHubs > 0 { |
| 149 | return false |
| 150 | } |
| 151 | if strings.TrimSpace(c.Routing.Retrieval.Strategy) != "" || c.Routing.Retrieval.TopK > 0 || len(c.Routing.Subsystems) > 0 { |
| 152 | return false |
| 153 | } |
| 154 | if c.Drift.Enabled || c.Drift.RecentCommits > 0 || len(c.Drift.RequireDocsFor) > 0 { |
| 155 | return false |
| 156 | } |
| 157 | return len(c.Only) > 0 |
| 158 | } |
| 159 | |
| 160 | // ModeOrDefault returns a valid hook orchestration mode. |
| 161 | func (c ProjectConfig) ModeOrDefault() string { |