Repeatability
High
Refactoring scattered regex patterns into a structured utility is a structurally consistent coding task. The pattern of consolidate-test-package is repeatable and well within established conventions.
Ambiguity Tolerance
Medium
Success criteria are mostly crisp — passing tests, correct regex per locale, valid npm package structure — but the 6 countries and exact format rules aren't specified, requiring the agent to make reasonable assumptions about which locales and formats to support.
Data & Tool Availability
Medium
The agent needs access to the existing codebase to extract scattered patterns, plus knowledge of locale-specific validation rules. If given file access and a list of target countries, this is straightforward; without the existing code, the agent must infer or reconstruct.
Error Cost
Low
This is a utility refactor with a test suite as a safety net — errors are caught before deployment and the output is easily reviewed by a developer. No production data or irreversible actions are involved.
Human Judgment Required
Low
Regex patterns for email, phone, and postal codes are well-documented standards. Locale rules are publicly known. A human review pass before merging is prudent but the core work doesn't require intuition or taste.