diff --git a/internal/scaffold/fullsend-repo/skills/code-implementation/SKILL.md b/internal/scaffold/fullsend-repo/skills/code-implementation/SKILL.md index 4215a4985..6413f7be5 100644 --- a/internal/scaffold/fullsend-repo/skills/code-implementation/SKILL.md +++ b/internal/scaffold/fullsend-repo/skills/code-implementation/SKILL.md @@ -307,6 +307,10 @@ Before writing code, form a concrete plan: changed behavior needs updated tests. 7. **Assess risk** — will this change affect other callers? Does it change a public interface? Could it break downstream consumers? +8. **Verify API contracts per code path** — if the fix removes or empties + a parameter sent to an external API, check the API documentation or + test each code path that uses the function. Different operations + (e.g., approve vs request-changes) often have different required fields. When requirements are ambiguous, distinguish between "vague but actionable" (you can make a reasonable conservative interpretation) and "genuinely diff --git a/internal/scaffold/scaffold_test.go b/internal/scaffold/scaffold_test.go index 394f43b74..dd5ad7359 100644 --- a/internal/scaffold/scaffold_test.go +++ b/internal/scaffold/scaffold_test.go @@ -369,6 +369,14 @@ func TestCodeAgentContent(t *testing.T) { assert.Contains(t, s, "code-implementation") } +func TestCodeImplementationSkillAPIContractGuidance(t *testing.T) { + content, err := FullsendRepoFile("skills/code-implementation/SKILL.md") + require.NoError(t, err) + s := string(content) + assert.Contains(t, s, "Verify API contracts per code path") + assert.Contains(t, s, "removes or empties") +} + func TestCodeWorkflowContent(t *testing.T) { content, err := FullsendRepoFile(".github/workflows/code.yml") require.NoError(t, err)