diff --git a/packages/pen-ai-skills/corpus/ab-v1/mobile-phone-input.yaml b/packages/pen-ai-skills/corpus/ab-v1/mobile-phone-input.yaml new file mode 100644 index 000000000..e67689c66 --- /dev/null +++ b/packages/pen-ai-skills/corpus/ab-v1/mobile-phone-input.yaml @@ -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 diff --git a/packages/pen-ai-skills/src/corpus/__tests__/corpus-loader.test.ts b/packages/pen-ai-skills/src/corpus/__tests__/corpus-loader.test.ts index a39ebf206..b58d5bb81 100644 --- a/packages/pen-ai-skills/src/corpus/__tests__/corpus-loader.test.ts +++ b/packages/pen-ai-skills/src/corpus/__tests__/corpus-loader.test.ts @@ -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', ]),