Skip to content

Make result advice more specific based on answers and evidence gaps #9

Description

@jokroese

Background

Internal feedback suggests the final advice should be more specific and operational, closer to what lawyers are explaining in training sessions.

Examples:

  • If the person lacks certain documents, explain what to prepare.
  • If timeline evidence is weak, explain why dated papers matter.
  • If facts are uncertain, explain what to clarify before speaking to an organisation.
  • If specialist issues appear, explain what to raise with legal support.

Problem

The current result engine already produces a checklist, but the advice is still broad.

Users may need clearer, answer-specific guidance.

Proposed change

Expand the result model so the final page can show targeted advice cards.

This must remain triage and preparation guidance, not legal determination.

Suggested data model

Add a new output to TriageResult:

export interface AdviceItem {
	id: string
	tone: 'info' | 'warning' | 'urgent'
	titleKey: MessageKey
	bodyKey: MessageKey
}

Then extend the result type:

export interface TriageResult {
	resultState: ResultState
	recommendedRoute: RecommendedRoute
	flags: MessageKey[]
	reasonKey?: MessageKey
	evidenceStrength: 'strong' | 'thin' | 'unknown'
	showHowToApply: boolean
	showSupportCta: boolean
	showDocumentCta: boolean
	checklist: PreparationChecklist
	explanationKey: MessageKey
	humanReviewRecommended: boolean
	adviceItems: AdviceItem[]
}

Generate advice items in:

  • src/lib/triage/engine.ts

Render them in:

  • src/routes/[lang=lang]/result/+page.svelte

Add content in:

  • src/lib/content/es.ts
  • src/lib/content/en.ts
  • src/lib/content/fr.ts
  • src/lib/content/ar.ts

Initial advice categories

Add targeted advice for:

  1. Missing identity documents
    Explain that identity documents are usually important and should be discussed with support.

  2. Weak before-cutoff evidence
    Explain that dated documents before 1 January 2026 may be important.

  3. Weak recent evidence
    Explain that documents from the recent five-month period may help show continuity.

  4. Asylum route complexity
    Explain that asylum/protection history should be reviewed carefully.

  5. Criminal-record concern
    Explain that the person should seek specialist advice before applying.

  6. Identity mismatch
    Explain that different names or dates across documents should be reviewed.

  7. Five-month continuity concern
    Explain that time outside Spain may affect the route and should be checked.

  8. Not sure answers
    Explain which facts to clarify before contacting an organisation.

Copy constraints

Good:

You said you do not currently have identity documents. This may make the process harder. Before applying, speak with a specialist organisation about what alternatives may be possible.

Avoid:

You cannot apply without a passport.

Good:

Try to gather dated documents from before 1 January 2026 and from the recent months before applying.

Avoid:

These documents will prove your residence.

Acceptance criteria

  • Result page shows targeted advice based on answers.
  • Advice is specific but does not claim legal certainty.
  • Advice items are test-covered in src/lib/triage/engine.test.ts.
  • Spanish, English, French, and Arabic copy are added.
  • The result page remains readable on mobile.
  • Advice is phrased as preparation guidance, not legal advice.
  • Legal reviewer can inspect advice keys and rules clearly.
  • Tests pass.

Why this matters

This is the highest-value next product improvement after the entry-point fix. It turns the screener from a routing tool into a preparation tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions