Step 2: Data validation

Validation checks whether salary research has the structure needed for later calculation. It preserves accepted evidence unchanged and records rejected or missing data without treating completeness as proof of market accuracy.

Flow

Workflow diagram for Step 2: Data validation
View full-size diagram

Required data

Each country needs both employer tiers with their required amounts and sources. A figure in an unrelated example or another section cannot silently fill a missing tier field. When older labels are clear, the agent checks their meaning rather than rejecting them for different wording.

Missing visa-rule information or an evidence grade does not automatically reject otherwise usable salary data. An absent grade stays not provided; an unknown rule stays a limitation for later comparison.

Malformed or incomplete blocks are skipped with reasons. Duplicates preserve the stored original, which means a retained original is still a usable country rather than a missing result.

Country boundaries

Generated input uses top-level Country: fields. If the boundary between countries is ambiguous, clarify it before saving instead of attaching a paragraph to whichever country appears closest.

Accepted research is saved exactly as supplied. The helper checks required fields and saves the data; commentary and validation status stay outside the original research blocks. If saving fails or finishes only partly, progress stays paused until the agent checks which files were saved and resolves the failure.

For example, a country can have complete salary tiers but no usable adjustment evidence. Validation can accept that research; the later adjustment step must still decide whether a numeric reduction is supported. Acceptance here does not authorize an assumed zero.

What happens next

The validated-data file holds accepted research. The original research file retains the raw findings and separate Validation report, including rejected inputs and missing-country reasons.

With stored countries, continue to International adjustment. If none remain usable, the workflow saves the no-result outcome and ends without requesting more evidence, career-ladder intake or an empty final table.

Structural validation does not verify market claims, select salary targets or establish visa eligibility. Those require their later evidence and calculation steps.

Explore the source

For implementation details, read prompts/salary-calculator/step2-data-validation.md.