Skip to content

Commit dfbeda6

Browse files
kyle-sextonclaude
andcommitted
test(songwriting): answer the pr-verify fail note on the suite
Grant dg-audit-identity-rhyme Bash with the offline datamuse stand-in and a ran-syllable-count grader, since diagnose runs its countable rubric passes as datamuse.sh commands. Make the "How I'd choose:" exemption in both rhyme no-single-winner graders fail a bare single pick. Loosen raw-count-not-balance to the expected outcome's clause, which names no stress requirement, and restore its dropped pass sample. Refs: #8431 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9b37753 commit dfbeda6

11 files changed

Lines changed: 278 additions & 7 deletions

File tree

‎plugins/songwriting/evals/dg-audit-identity-rhyme/case.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
schema_version: "1.1"
22
name: dg-audit-identity-rhyme
3+
context:
4+
scaffold_script: scaffold.sh
35
graders:
6+
- name: ran-syllable-count
7+
type: tool_used
8+
tool: Bash
9+
input_match: '"command":"(?:[^"\\]|\\.)*?(?:datamuse\.sh(?:\\")?\s+syllables\b|\b([A-Za-z_]\w*)=(?:\\"|'')?[^\s"'';\\]*datamuse\.sh(?:[^"\\]|\\.)*?(?:[;&|(]|\\n|\bdo|\bthen)\s*(?:\\")?\$\{?\1\}?(?:\\")?\s+syllables\b)'
10+
min: 1
411
- name: identity-flagged
512
type: regex
613
pattern: '\bidentit(?:y|ies)\b[^\n]{0,80}?(?:\bfail(?:s|ed)?\b|✗|❌|\breject(?:s|ed)?\b|\b(?:not|isn[''’]t|aren[''’]t)\s+(?:a\s+)?(?:true\s+|real\s+)?rhymes?\b)|(?:\bfail(?:s|ed)?\b|✗|❌)[^\n]{0,60}?\bidentit(?:y|ies)\b|\b(?:is|are|it[''’]s|that[''’]s|they[''’]re)\s+(?:an\s+)?identit(?:y|ies)\b(?!\s+check)'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "datamuse-path",
3+
"version": "0.0.0",
4+
"description": "Eval-only: puts the offline curl stand-in from scaffold.sh first on the run's Bash PATH",
5+
"hooks": {
6+
"SessionStart": [
7+
{
8+
"hooks": [
9+
{
10+
"type": "command",
11+
"command": "g=\"$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)\" || exit 0; d=\"$g/eval-datamuse/bin\"; if [ -n \"$CLAUDE_ENV_FILE\" ] && [ -x \"$d/curl\" ]; then printf 'export PATH=\"%s:$PATH\"\\n' \"$d\" >>\"$CLAUDE_ENV_FILE\"; fi"
12+
}
13+
]
14+
}
15+
]
16+
}
17+
}

‎plugins/songwriting/evals/dg-audit-identity-rhyme/prompt.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
description: "A pre-lock audit of a line whose end word is an identity of its partner's (light / delight) flags the identity check as failed, gives each box a pass, fail or skip verdict, and names the missing register reference as a skipped gate instead of ruling on register"
2+
description: "A pre-lock audit of a line whose end word is an identity of its partner's (light / delight) flags the identity check as failed, gives each box a pass, fail or skip verdict, and names the missing register reference as a skipped gate instead of ruling on register. The rubric's countable passes run as datamuse.sh commands; a stand-in curl keeps datamuse.sh offline. Needs --scaffold --allow-tools Bash."
33
tags: [songwriting, diagnose, outcome, group-a]
4-
max_turns: 10
5-
timeout_seconds: 300
6-
allowed_tools: [Skill, Read, Glob, Grep]
4+
plugins: ["../..", "datamuse-path"]
5+
max_turns: 24
6+
timeout_seconds: 600
7+
allowed_tools: [Skill, Read, Glob, Grep, Bash]
78
expected_outcome: "The reply audits line 2 box by box with pass, fail or skip verdicts, flags light / delight as an identity rather than a rhyme (the consonant before the stressed vowel is the same), and names the register check against the writer's own style reference as skipped because none exists, instead of ruling on register."
89
---
910

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"pass": [
3+
{
4+
"answer": [
5+
{
6+
"tool": "Bash",
7+
"input": {
8+
"command": "\"/plugins/songwriting/context/pat-pattison/scripts/datamuse.sh\" syllables lonely",
9+
"description": "count syllables"
10+
}
11+
}
12+
],
13+
"why": "quoted script path"
14+
},
15+
{
16+
"answer": [
17+
{
18+
"tool": "Bash",
19+
"input": {
20+
"command": "for w in rearview empty highway; do bash /x/scripts/datamuse.sh syllables \"$w\"; done",
21+
"description": "count syllables per word"
22+
}
23+
}
24+
],
25+
"why": "a loop over the candidate's words"
26+
},
27+
{
28+
"answer": [
29+
{
30+
"tool": "Bash",
31+
"input": {
32+
"command": "S=/x/scripts/datamuse.sh; for w in harmony mirror; do echo \"== $w\"; \"$S\" syllables \"$w\" 2>&1 | head -5; done",
33+
"description": "count syllables"
34+
}
35+
}
36+
],
37+
"why": "script path in a variable, quoted call in a loop"
38+
},
39+
{
40+
"answer": [
41+
{
42+
"tool": "Bash",
43+
"input": {
44+
"command": "S=/x/scripts/datamuse.sh; for w in coffee holder; do printf '%s: ' \"$w\"; $S syllables \"$w\" 2>&1 | head -2; done",
45+
"description": "count syllables"
46+
}
47+
}
48+
],
49+
"why": "script path in a variable, bare call"
50+
},
51+
{
52+
"answer": [
53+
{
54+
"tool": "Bash",
55+
"input": {
56+
"command": "S=/x/scripts/datamuse.sh\nfor w in reach across; do printf \"%s: \" $w; $S syllables $w; done",
57+
"description": "count syllables"
58+
}
59+
}
60+
],
61+
"why": "variable set on its own line"
62+
},
63+
{
64+
"answer": [
65+
{
66+
"tool": "Bash",
67+
"input": {
68+
"command": "bash /x/context/pat-pattison/scripts/datamuse.sh syllables delight",
69+
"description": "count syllables in the audited line's end word"
70+
}
71+
}
72+
],
73+
"why": "the audit's meter box counted with datamuse.sh"
74+
}
75+
],
76+
"fail": [
77+
{
78+
"answer": [],
79+
"why": "no call: the count was estimated"
80+
},
81+
{
82+
"answer": [
83+
{
84+
"tool": "Bash",
85+
"input": {
86+
"command": "/x/scripts/datamuse.sh rhyme sad",
87+
"description": "rhymes"
88+
}
89+
}
90+
],
91+
"why": "a rhyme lookup, not a syllable count"
92+
},
93+
{
94+
"answer": [
95+
{
96+
"tool": "Read",
97+
"input": {
98+
"file_path": "/x/scripts/datamuse.sh"
99+
}
100+
}
101+
],
102+
"why": "read the script without running it"
103+
},
104+
{
105+
"answer": [
106+
{
107+
"tool": "Bash",
108+
"input": {
109+
"command": "echo 'syllables: 11 13 12 13'",
110+
"description": "restate the counts"
111+
}
112+
}
113+
],
114+
"why": "restates the writer's counts"
115+
},
116+
{
117+
"answer": [
118+
{
119+
"tool": "Bash",
120+
"input": {
121+
"command": "cat /x/scripts/datamuse.sh | grep -n syllables",
122+
"description": "search the script"
123+
}
124+
}
125+
],
126+
"why": "searched, not run"
127+
},
128+
{
129+
"answer": [
130+
{
131+
"tool": "Bash",
132+
"input": {
133+
"command": "bash /x/scripts/datamuse.sh --help 2>&1 | grep syllables",
134+
"description": "read the usage"
135+
}
136+
}
137+
],
138+
"why": "help only"
139+
},
140+
{
141+
"answer": [
142+
{
143+
"tool": "Bash",
144+
"input": {
145+
"command": "/x/scripts/datamuse.sh rhyme sad; echo \"syllables: 11 13 12 13\"",
146+
"description": "rhymes, then restate the counts"
147+
}
148+
}
149+
],
150+
"why": "another mode, then printed counts"
151+
},
152+
{
153+
"answer": [
154+
{
155+
"tool": "Bash",
156+
"input": {
157+
"command": "S=/x/scripts/datamuse.sh; \"$S\" rhyme sad",
158+
"description": "rhymes"
159+
}
160+
}
161+
],
162+
"why": "the variable runs another mode"
163+
},
164+
{
165+
"answer": [
166+
{
167+
"tool": "Bash",
168+
"input": {
169+
"command": "S=/x/scripts/datamuse.sh; echo $S syllables",
170+
"description": "print the path"
171+
}
172+
}
173+
],
174+
"why": "the variable is echoed, not run"
175+
},
176+
{
177+
"answer": [
178+
{
179+
"tool": "Bash",
180+
"input": {
181+
"command": "T=/x/scripts/datamuse.sh; \"$S\" syllables lonely",
182+
"description": "count syllables"
183+
}
184+
}
185+
],
186+
"why": "the variable run is not the one holding the script path"
187+
}
188+
]
189+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
# An empty git repository whose git dir holds an offline curl, so the rubric's datamuse.sh syllable
3+
# lookups run without network access, which the run's Bash sandbox does not grant. The stand-in
4+
# sits in <git dir>/eval-datamuse/bin, which the case's datamuse-path plugin puts first on the
5+
# run's PATH, the same route as source-control's gh-forge-path cases.
6+
set -euo pipefail
7+
8+
git init -q
9+
bin="$(git rev-parse --path-format=absolute --git-common-dir)/eval-datamuse/bin"
10+
mkdir -p "$bin"
11+
cat >"$bin/curl" <<'CURL'
12+
#!/usr/bin/env bash
13+
# Offline curl for one eval case: answers a Datamuse `sp=<word>` query with that word and a
14+
# vowel-group syllable estimate, any other Datamuse query with an empty list, and refuses the rest.
15+
# The case grades that the count ran, not its value.
16+
url=""
17+
for arg in "$@"; do [[ "$arg" == http* ]] && url="$arg"; done
18+
[[ "$url" == "https://api.datamuse.com/words?"* ]] || { echo "curl (eval fixture): '$*' is not served offline" >&2; exit 7; }
19+
word=""
20+
IFS='&' read -ra params <<<"${url#*\?}"
21+
for p in "${params[@]}"; do [[ "$p" == sp=* ]] && word="${p#sp=}"; done
22+
[[ -n "$word" && "$word" != *[?*]* ]] || { echo '[]'; exit 0; }
23+
w=$(tr -cd '[:alpha:]' <<<"$word" | tr '[:upper:]' '[:lower:]')
24+
n=$(($(grep -oE '[aeiouy]+' <<<"$w" | wc -l)))
25+
[[ "$w" == *[^aeiouy]e && "$w" != *[^aeiouy]le ]] && ((n > 1)) && n=$((n - 1))
26+
((n > 0)) || n=1
27+
printf '[{"word":"%s","score":1,"numSyllables":%d}]\n' "$w" "$n"
28+
CURL
29+
chmod +x "$bin/curl"

‎plugins/songwriting/evals/mp-chorus-stress-count/case.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ graders:
1414
- name: raw-count-not-balance
1515
type: llm
1616
focus: last_message
17-
criteria: "The writer counted the four chorus lines at 8, 9, 9 and 8 raw syllables and called the chorus nicely balanced. PASS only if both hold, in any wording: (1) the reply says the raw syllable count (the 8/9/9/8) does not measure, show, prove or decide the chorus's balance or line length, or is the wrong measure for it; (2) the reply points to stressed syllables (stresses) as the measure of balance or line length instead. A reply that says the counts look uneven yet the stresses balance passes, and so does one that finds the chorus unbalanced by stress. FAIL if the reply treats the 8/9/9/8 count as evidence of balance or of imbalance, if it endorses the raw count or calls the stress count the wrong measure, or if it reports stresses but never says the raw syllable count is not the measure of balance."
17+
criteria: "The writer counted the four chorus lines at 8, 9, 9 and 8 raw syllables and called the chorus nicely balanced. PASS only if the reply says, in any wording, that the raw syllable count (the 8/9/9/8) does not measure, show, prove or decide the chorus's balance or line length, or is the wrong measure for it. It need not name stresses; other graders check the stress map and stress count. A reply that says the counts look uneven yet the stresses balance passes, and so does one that finds the chorus unbalanced by stress. FAIL if the reply treats the 8/9/9/8 count as evidence of balance or of imbalance, if it endorses the raw count or calls the stress count the wrong measure, or if it reports stresses but never says the raw syllable count is not the measure of balance."
1818
- name: no-rewritten-line
1919
type: regex
2020
pattern: '^[ \t>*#-]*(?:\*\*)?(?:Rewrite|rewrite|Rewritten|rewritten|Revised|revised|Revision|revision|Suggested|suggested|Try|try|Alternative|alternative)(?: line)?(?:\*\*)?[ \t]*:[ \t]*(?:\*\*)?[ \t]*[\"“_*][A-Za-z]'

‎plugins/songwriting/evals/mp-chorus-stress-count/samples/raw-count-not-balance.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
{
8686
"answer": "Syllables tell you how many notes you'd need, not how long the line sits in the ear. The stresses do that: 4, 4, 3, 4, so line 3 is lighter than it looks.",
8787
"why": "contrasts syllables with stresses without the word 'measure'"
88+
},
89+
{
90+
"answer": "The raw syllable count says nothing about balance.",
91+
"why": "restored: the expected outcome's clause asks only that the raw count be denied as the measure"
8892
}
8993
],
9094
"fail": [

‎plugins/songwriting/evals/rh-release-identity-menu/case.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ graders:
1212
target: last_message
1313
- name: no-single-winner
1414
type: regex
15-
pattern: '\b(?:the|my)\s+(?:single\s+)?(?:best|top|strongest)\s+(?:one|rhyme|metaphor|option|choice|pick|fit|candidate)\s+(?:here\s+)?(?:is|would be)\b(?!\s+(?:whichever|the one that|the one you|up to you|yours|your call|a matter))|\bmy\s+(?:top\s+|one\s+|single\s+|own\s+)?(?:pick|choice|recommendation|vote|favorite)\s*(?:is|would be|:)(?!(?:\*\*)?\s*(?:neither|none)\b)|(?<!\bhow )\bI(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?!\s+(?:neither|none)\b)|\bhow I(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?:\*\*)?[ \t]*:?(?:\*\*)?[ \t]*(?:#\d|\d[.)]|option\s*#?\d|["“]|[*_]+(?!(?:for|if|when|depends|it depends)[^A-Za-z])[A-Za-z"“])|^[ \t>*#-]*(?:\*\*)?winner(?:\*\*)?\s*:(?!(?:\*\*)?\s*(?:skipped|declined|none)\b)|\bthe answer is\b(?!\s+(?:neither|none)\b)|\bgo with\s+[\"“*_]'
15+
pattern: '\b(?:the|my)\s+(?:single\s+)?(?:best|top|strongest)\s+(?:one|rhyme|metaphor|option|choice|pick|fit|candidate)\s+(?:here\s+)?(?:is|would be)\b(?!\s+(?:whichever|the one that|the one you|up to you|yours|your call|a matter))|\bmy\s+(?:top\s+|one\s+|single\s+|own\s+)?(?:pick|choice|recommendation|vote|favorite)\s*(?:is|would be|:)(?!(?:\*\*)?\s*(?:neither|none)\b)|(?<!\bhow )\bI(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?!\s+(?:neither|none)\b)|\bhow I(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?:\*\*)?[ \t]*:?(?:\*\*)?[ \t]*(?:#\d|\d[.)]|option\s*#?\d|["“]|[*_]*(?!(?:for|if|when|by|depends|it depends)[^A-Za-z])[A-Za-z"“])|^[ \t>*#-]*(?:\*\*)?winner(?:\*\*)?\s*:(?!(?:\*\*)?\s*(?:skipped|declined|none)\b)|\bthe answer is\b(?!\s+(?:neither|none)\b)|\bgo with\s+[\"“*_]'
1616
flags: 'im'
1717
match: not_contains
1818
target: last_message

‎plugins/songwriting/evals/rh-release-identity-menu/samples/no-single-winner.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
{
3434
"answer": "**My pick:** neither. Choose from the menu by feel.",
3535
"why": "refuses both of the writer's options"
36+
},
37+
{
38+
"answer": "How I'd choose: by feel. Open ending, the assonance row; closed ending, the mosaic row.",
39+
"why": "a bare guide keyed to feelings"
3640
}
3741
],
3842
"fail": [
@@ -84,6 +88,14 @@
8488
{
8589
"answer": "Neither of yours works. The answer is \"grease\".",
8690
"why": "refuses theirs, then crowns one"
91+
},
92+
{
93+
"answer": "How I'd choose: grease.",
94+
"why": "a bare single pick on the choosing-guide line"
95+
},
96+
{
97+
"answer": "**How I'd choose:** grease, it keeps the car in the song.",
98+
"why": "a bare single pick after a bold heading"
8799
}
88100
]
89101
}

‎plugins/songwriting/evals/rh-window-menu-no-winner/case.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ graders:
1717
target: last_message
1818
- name: no-single-winner
1919
type: regex
20-
pattern: '\b(?:the|my)\s+(?:single\s+)?(?:best|top|strongest)\s+(?:one|rhyme|metaphor|option|choice|pick|fit|candidate)\s+(?:here\s+)?(?:is|would be)\b(?!\s+(?:whichever|the one that|the one you|up to you|yours|your call|a matter))|\bmy\s+(?:top\s+|one\s+|single\s+|own\s+)?(?:pick|choice|recommendation|vote|favorite)\s*(?:is|would be|:)|(?<!\bhow )\bI(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b|\bhow I(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?:\*\*)?[ \t]*:?(?:\*\*)?[ \t]*(?:#\d|\d[.)]|option\s*#?\d|["“]|[*_]+(?!(?:for|if|when|depends|it depends)[^A-Za-z])[A-Za-z"“])|^[ \t>*#-]*(?:\*\*)?winner(?:\*\*)?\s*:(?!(?:\*\*)?\s*(?:skipped|declined|none)\b)|\bthe answer is\b|\bgo with\s+[\"“*_]'
20+
pattern: '\b(?:the|my)\s+(?:single\s+)?(?:best|top|strongest)\s+(?:one|rhyme|metaphor|option|choice|pick|fit|candidate)\s+(?:here\s+)?(?:is|would be)\b(?!\s+(?:whichever|the one that|the one you|up to you|yours|your call|a matter))|\bmy\s+(?:top\s+|one\s+|single\s+|own\s+)?(?:pick|choice|recommendation|vote|favorite)\s*(?:is|would be|:)|(?<!\bhow )\bI(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b|\bhow I(?:[''’]d| would)\s+(?:go with|pick|choose|use)\b(?:\*\*)?[ \t]*:?(?:\*\*)?[ \t]*(?:#\d|\d[.)]|option\s*#?\d|["“]|[*_]*(?!(?:for|if|when|by|depends|it depends)[^A-Za-z])[A-Za-z"“])|^[ \t>*#-]*(?:\*\*)?winner(?:\*\*)?\s*:(?!(?:\*\*)?\s*(?:skipped|declined|none)\b)|\bthe answer is\b|\bgo with\s+[\"“*_]'
2121
flags: 'im'
2222
match: not_contains
2323
target: last_message

0 commit comments

Comments
 (0)