Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-simplifier.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/code-simplifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ Code simplifier has nothing to process today.

For each file in `source-files.json`:

1. Use `scope-filter` (`model: small`) to confirm the file should be simplified and detect language.
1. Use `scope-filter` (`model: claude-haiku-4.5`) to confirm the file should be simplified and detect language.
2. Apply only the matching language skill guidance (do not load unrelated language guidance).
3. Use `simplification-scout` (`model: small`) for extractive opportunity scoring.
3. Use `simplification-scout` (`model: claude-haiku-4.5`) for extractive opportunity scoring.
4. Make targeted edits that preserve behavior.

Priorities:
Expand Down Expand Up @@ -260,7 +260,7 @@ Do not finish with plain text only. The safe-output tool call is required.
## agent: `scope-filter`
---
description: Decides whether a candidate file should be simplified and labels its primary language
model: small
model: claude-haiku-4.5
---
Input is a single file path string. Return strict JSON only:
`{"path":"...","include":true|false,"language":"go|typescript|javascript|python|csharp|other","reason":"..."}`
Expand All @@ -270,7 +270,7 @@ Set `include` to false for tests, generated files, lockfiles, vendored code, or
## agent: `simplification-scout`
---
description: Extractive scout that proposes low-risk simplification opportunities per file
model: small
model: claude-haiku-4.5
---
Given file content, return strict JSON only:
`{"path":"...","opportunities":[{"kind":"clarity|duplication|complexity|naming","summary":"...","risk":"low|medium"}]}`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contribution-check.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/contribution-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Read the contents of `contributing-guidelines-truncated.md` from the workspace r

Call the contribution-checker subagent for each PR with this prompt:

Use `model: small` for every contribution-checker subagent call.
Use `model: claude-haiku-4.5` for every contribution-checker subagent call.

```
The CONTRIBUTING.md content for this repository is attached below (already truncated to 2000 chars by the pre-agent step).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-description-caveman.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/pr-description-caveman.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If there are no meaningful changes, call `noop` instead.
## agent: `chunk-analyzer`
---
description: Analyses one 400-line slice of a unified diff and extracts structured per-file change facts.
model: small
model: claude-haiku-4.5
---

You receive a slice of a unified diff (`diff --git` format). Extract facts about every changed file found in this slice.
Expand Down
30 changes: 30 additions & 0 deletions pkg/cli/code_simplifier_workflow_contract_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//go:build !integration

package cli

import (
"os"
"path/filepath"
"testing"

"github.com/github/gh-aw/pkg/gitutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestCodeSimplifierWorkflowSubAgentModelContract(t *testing.T) {
repoRoot, err := gitutil.FindGitRoot()
if err != nil {
t.Skipf("Skipping test: not in a git repository: %v", err)
}

workflowPath := filepath.Join(repoRoot, ".github", "workflows", "code-simplifier.md")
content, err := os.ReadFile(workflowPath)
require.NoError(t, err, "Should read code-simplifier workflow")

text := string(content)
assert.Contains(t, text, "## agent: `scope-filter`", "Workflow should define the scope-filter sub-agent")
assert.Contains(t, text, "## agent: `simplification-scout`", "Workflow should define the simplification-scout sub-agent")
assert.Contains(t, text, "model: claude-haiku-4.5", "Sub-agents should pin a supported Haiku model")
Comment on lines +26 to +28
assert.NotContains(t, text, "model: small", "Sub-agents should not use the unresolved 'small' alias")
}
2 changes: 1 addition & 1 deletion pkg/cli/contribution_check_workflow_contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ func TestContributionCheckWorkflowSafeOutputContract(t *testing.T) {
assert.Contains(t, text, "#<temporary_id>", "Workflow must describe item_number temporary_id reference format")
assert.Contains(t, text, "Never emit `add_comment` without a numeric target field", "Workflow must forbid targetless add_comment items")
assert.Contains(t, text, "\"issue_number\":35304", "Workflow should include a concrete add_comment issue_number example")
assert.Contains(t, text, "model: small", "Workflow should require small model for contribution-checker subagent calls")
assert.Contains(t, text, "model: claude-haiku-4.5", "Workflow should require small model for contribution-checker subagent calls")
}
29 changes: 29 additions & 0 deletions pkg/cli/pr_description_caveman_workflow_contract_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//go:build !integration

package cli

import (
"os"
"path/filepath"
"testing"

"github.com/github/gh-aw/pkg/gitutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestPRDescriptionCavemanWorkflowSubAgentModelContract(t *testing.T) {
repoRoot, err := gitutil.FindGitRoot()
if err != nil {
t.Skipf("Skipping test: not in a git repository: %v", err)
}

workflowPath := filepath.Join(repoRoot, ".github", "workflows", "pr-description-caveman.md")
content, err := os.ReadFile(workflowPath)
require.NoError(t, err, "Should read pr-description-caveman workflow")

text := string(content)
assert.Contains(t, text, "## agent: `chunk-analyzer`", "Workflow should define the chunk-analyzer sub-agent")
assert.Contains(t, text, "model: claude-haiku-4.5", "chunk-analyzer sub-agent should pin a supported Haiku model")
Comment on lines +26 to +27
assert.NotContains(t, text, "model: small", "chunk-analyzer sub-agent should not use the unresolved 'small' alias")
}