feat(ab-corpus): mobile-phone-input ab-v1 prompt for add_phone_input_v0
Adds 24th v1 prompt and rolls the 2026-04-25 batch from 6 to 7 tools (5 v0 + 2 v1). Loader test count + tool-set assertions updated.
This commit is contained in:
parent
577488546a
commit
3527f6ff6a
26
packages/pen-ai-skills/corpus/ab-v1/mobile-phone-input.yaml
Normal file
26
packages/pen-ai-skills/corpus/ab-v1/mobile-phone-input.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
id: mobile-phone-input
|
||||
category: mobile
|
||||
difficulty: obvious
|
||||
prompt: |
|
||||
Design ONLY a phone-number input field for an international
|
||||
signup screen. The field has a "Phone number" label above (with
|
||||
a red asterisk because it's required), then a single 44px-tall
|
||||
row container with rounded corners and a thin slate border. The
|
||||
row content from left to right:
|
||||
- a country selector area showing a small US flag (🇺🇸), the
|
||||
dial code "+1", and a chevron-down indicator
|
||||
- a thin vertical divider
|
||||
- the digits input area showing the placeholder text
|
||||
"(555) 555-5555" in muted slate
|
||||
Do NOT render a dropdown menu, surrounding form, or other
|
||||
inputs — just the one phone-number row.
|
||||
expected:
|
||||
must_contain_roles:
|
||||
- phone-input-field
|
||||
- phone-input-row
|
||||
- phone-input-country
|
||||
- phone-input-code
|
||||
- phone-input-chevron
|
||||
- phone-input-divider
|
||||
- phone-input-digits-text
|
||||
expected_tool_if_any: add_phone_input_v0
|
||||
|
|
@ -65,20 +65,20 @@ describe('loadCorpus — real corpus', () => {
|
|||
describe('loadCorpus — v1 supplemental corpus (new tools)', () => {
|
||||
// v1 covers tools added after the v0 freeze, in chronological batches:
|
||||
// 2026-04-22 (12 tools) / 2026-04-24 (5 tools, 4 v0 + first v1) /
|
||||
// 2026-04-25 (6 tools, 4 v0 + 2 v1). All obvious — one prompt per
|
||||
// 2026-04-25 (7 tools, 5 v0 + 2 v1). All obvious — one prompt per
|
||||
// tool so A/B runs can measure routing + legality on the new surface
|
||||
// without re-running the v0 corpus. See `corpus/ab-v1/README.md`.
|
||||
it('loads 23 prompts, all obvious, one per new tool', () => {
|
||||
it('loads 24 prompts, all obvious, one per new tool', () => {
|
||||
const prompts = loadCorpus(REPO_CORPUS_V1_DIR);
|
||||
expect(prompts).toHaveLength(23);
|
||||
expect(new Set(prompts.map((p) => p.id)).size).toBe(23);
|
||||
expect(prompts).toHaveLength(24);
|
||||
expect(new Set(prompts.map((p) => p.id)).size).toBe(24);
|
||||
for (const p of prompts) {
|
||||
expect(p.difficulty).toBe('obvious');
|
||||
expect(p.expected_tool_if_any).toMatch(/^add_[a-z_]+_v\d+$/);
|
||||
}
|
||||
});
|
||||
|
||||
it('covers 2026-04-22 (12) + 2026-04-24 (5) + 2026-04-25 (6) batches', () => {
|
||||
it('covers 2026-04-22 (12) + 2026-04-24 (5) + 2026-04-25 (7) batches', () => {
|
||||
const prompts = loadCorpus(REPO_CORPUS_V1_DIR);
|
||||
const tools = new Set(prompts.map((p) => p.expected_tool_if_any));
|
||||
expect(tools).toEqual(
|
||||
|
|
@ -102,11 +102,12 @@ describe('loadCorpus — v1 supplemental corpus (new tools)', () => {
|
|||
'add_attachment_row_v0',
|
||||
'add_chat_bubble_v0',
|
||||
'add_modal_shell_v1',
|
||||
// 2026-04-25 batch (6 tools) — 4 new v0 + 2 new v1
|
||||
// 2026-04-25 batch (7 tools) — 5 new v0 + 2 new v1
|
||||
'add_social_login_row_v0',
|
||||
'add_pricing_card_v0',
|
||||
'add_stat_card_v0',
|
||||
'add_range_slider_v0',
|
||||
'add_phone_input_v0',
|
||||
'add_toast_v1',
|
||||
'add_empty_chart_v1',
|
||||
]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue