@yukioa2z/visa-apply 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/bin/install.js +67 -0
- package/package.json +34 -0
- package/skill/SKILL.md +80 -0
- package/skill/agents/openai.yaml +7 -0
- package/skill/assets/visa-dossier-template.html +601 -0
- package/skill/references/adapter-schema.md +55 -0
- package/skill/references/core-intake.md +66 -0
- package/skill/references/countries/au.md +149 -0
- package/skill/references/countries/ca.md +124 -0
- package/skill/references/countries/jp.md +133 -0
- package/skill/references/countries/schengen.md +183 -0
- package/skill/references/countries/uk.md +144 -0
- package/skill/references/countries/us.md +134 -0
- package/skill/references/jurisdictions.json +1538 -0
- package/skill/references/live-route-check.md +76 -0
- package/skill/references/official-sources.json +1861 -0
- package/skill/references/pipeline.md +104 -0
- package/skill/references/quality-gates.md +52 -0
- package/skill/scripts/create_dossier.py +140 -0
- package/skill/scripts/source_registry.py +386 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Visa Application Pipeline
|
|
2
|
+
|
|
3
|
+
## 1. Intake Routing
|
|
4
|
+
|
|
5
|
+
Collect only the routing facts first:
|
|
6
|
+
|
|
7
|
+
- destination country or area
|
|
8
|
+
- all nationalities, or stateless/refugee status
|
|
9
|
+
- travel-document type and issuing country
|
|
10
|
+
- country of legal residence and residence status
|
|
11
|
+
- current physical location and intended application location
|
|
12
|
+
- travel purpose
|
|
13
|
+
- intended arrival, duration, and number of entries
|
|
14
|
+
- whether the applicant already holds relevant visas or residence permits
|
|
15
|
+
|
|
16
|
+
Do not start a detailed questionnaire until the live route check identifies visa-free, ETA, eVisa, visa on arrival, consular visa, transit authorization, residence route, mixed, or unresolved.
|
|
17
|
+
|
|
18
|
+
Never use interface language, IP location, time zone, or the user's current city as a proxy for citizenship or residence. Citizenship, document issuer, legal residence, physical location, and consular jurisdiction can all differ.
|
|
19
|
+
|
|
20
|
+
## 2. Run The Live Visa-Need Check
|
|
21
|
+
|
|
22
|
+
Resolve the destination through `jurisdictions.json`. Use `official-sources.json` only as a set of cached starting URLs, never as a current visa-policy answer. Browse on every new application and follow this authority order:
|
|
23
|
+
|
|
24
|
+
1. National immigration authority, foreign ministry, or supranational authority such as the European Commission.
|
|
25
|
+
2. Embassy or consulate responsible for the applicant's legal residence.
|
|
26
|
+
3. Official government application portal.
|
|
27
|
+
4. Delegated visa application centre for logistics only.
|
|
28
|
+
|
|
29
|
+
A delegated centre can establish appointment, submission, and service-fee logistics. It cannot override government eligibility or document rules. Never treat travel blogs, agencies, forums, search snippets, or AI summaries as application authority.
|
|
30
|
+
|
|
31
|
+
Check visa exemption, ETA, eVisa, visa on arrival, consular visa, transit, and residence-permit substitution for the exact route key. Check every transit and self-transfer separately. Cross-check IATA Travel Centre/Timatic or the operating carrier for boarding requirements and label that result operational, not legal.
|
|
32
|
+
|
|
33
|
+
Apply the freshness and conflict rules in `live-route-check.md`. Do not continue to detailed intake until the verdict and its evidence are written to the HTML.
|
|
34
|
+
|
|
35
|
+
## 3. Create A Source Snapshot
|
|
36
|
+
|
|
37
|
+
Before asking detailed questions, record in the HTML:
|
|
38
|
+
|
|
39
|
+
- exact official URLs
|
|
40
|
+
- authority name
|
|
41
|
+
- page purpose
|
|
42
|
+
- date checked
|
|
43
|
+
- applicant nationality and residence used for the lookup
|
|
44
|
+
- travel-document issuer, residence status, and application location used for the lookup
|
|
45
|
+
- unresolved conflicts or location-specific requirements
|
|
46
|
+
|
|
47
|
+
Recheck immediately before filing or payment, whenever the itinerary changes, and whenever the live route check is more than 7 days old. Recheck entry and carrier requirements within 72 hours before departure.
|
|
48
|
+
|
|
49
|
+
## 4. Build The Country And Visa-Type Adapter
|
|
50
|
+
|
|
51
|
+
Load an existing adapter from `references/countries/` when available. Otherwise use `adapter-schema.md` to create a temporary adapter in the dossier from the official sources.
|
|
52
|
+
|
|
53
|
+
Compose the question set from:
|
|
54
|
+
|
|
55
|
+
- `core-intake.md`
|
|
56
|
+
- destination-country requirements
|
|
57
|
+
- visa-type requirements
|
|
58
|
+
- applicant-specific branches such as minors, sponsors, prior refusals, dependants, work, study, medical travel, or family relationship
|
|
59
|
+
|
|
60
|
+
Mark unsupported or uncertain branches as `Pending official verification`.
|
|
61
|
+
|
|
62
|
+
## 5. Grill And Collect
|
|
63
|
+
|
|
64
|
+
Use the `grill-me` pattern. Ask one question at a time by default and provide the recommended answer format. If the user asks for batches, group a compact set by form page or evidence category.
|
|
65
|
+
|
|
66
|
+
Write every answer to the HTML immediately:
|
|
67
|
+
|
|
68
|
+
- raw wording and provenance under `Source: Collected Answers`
|
|
69
|
+
- normalized value under `Final Visa Application Preview`
|
|
70
|
+
- required evidence under `Document Checklist`
|
|
71
|
+
- missing or inferred values under `Open Issues`
|
|
72
|
+
|
|
73
|
+
The HTML remains the only source of truth.
|
|
74
|
+
|
|
75
|
+
## 6. Quality And Review Gates
|
|
76
|
+
|
|
77
|
+
Run `quality-gates.md`. Before browser entry, verify:
|
|
78
|
+
|
|
79
|
+
- the correct visa route and responsible post
|
|
80
|
+
- source snapshot is current
|
|
81
|
+
- every required field has a final value or explicit unresolved status
|
|
82
|
+
- documents support the stated purpose, funding, accommodation, and ties
|
|
83
|
+
- dates and identity fields are consistent across documents
|
|
84
|
+
- the applicant reviewed all sensitive, security, immigration-history, and declaration answers
|
|
85
|
+
- transit, document-format, translation/legalization, deadline/time-zone, fee/refund, evidence-expiry, and post-arrival branches are resolved
|
|
86
|
+
|
|
87
|
+
## 7. Assisted Form Entry
|
|
88
|
+
|
|
89
|
+
Use the available Browser or Computer Use capability. In non-Codex environments, use an equivalent browser/computer skill such as Peekaboo or the runtime's supported automation package.
|
|
90
|
+
|
|
91
|
+
Do not bypass CAPTCHA or anti-automation controls. Do not invent data. The applicant handles passwords, CAPTCHA, final declaration, signature, certification, and submission unless the official process explicitly permits an authorized representative and the user has established that authority.
|
|
92
|
+
|
|
93
|
+
## 8. Backfill And Track
|
|
94
|
+
|
|
95
|
+
After each portal milestone, update the HTML with:
|
|
96
|
+
|
|
97
|
+
- application or case number
|
|
98
|
+
- submission date
|
|
99
|
+
- fee and receipt number
|
|
100
|
+
- biometrics or appointment date and location
|
|
101
|
+
- document-request deadlines
|
|
102
|
+
- decision/status and passport-return details
|
|
103
|
+
|
|
104
|
+
Progress checkpoints are: live visa-need check, intake, documents, application, fee, appointment/biometrics, decision, and passport/visa received.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Application Quality Gates
|
|
2
|
+
|
|
3
|
+
Use these checks after the route is resolved and before submission.
|
|
4
|
+
|
|
5
|
+
## Identity And Jurisdiction
|
|
6
|
+
|
|
7
|
+
- Names, dates, passport numbers, nationality, and civil status agree across all records.
|
|
8
|
+
- The travel document remains valid for the rule-specific margin and has required blank pages.
|
|
9
|
+
- Legal residence supports filing at the selected post; residence permit expiry is acceptable.
|
|
10
|
+
- Native-script, transliteration, prior names, and dual nationality are handled as the form defines them.
|
|
11
|
+
|
|
12
|
+
## Itinerary And Transit
|
|
13
|
+
|
|
14
|
+
- Every border crossing, transit, self-transfer, airport change, and overnight stop is checked.
|
|
15
|
+
- Purpose and planned activities stay within the selected route, including business and remote-work boundaries.
|
|
16
|
+
- Accommodation, host, transport, dates, duration, and entries agree across the form and evidence.
|
|
17
|
+
- Non-refundable travel is not treated as mandatory unless the authority explicitly requires it.
|
|
18
|
+
|
|
19
|
+
## Documents
|
|
20
|
+
|
|
21
|
+
- Always-required, conditional, post-specific, and post-submission documents are separated.
|
|
22
|
+
- Translations, certified copies, notarization, apostille/legalization, and document recency are verified.
|
|
23
|
+
- Photo, scan, filename, file type, size, resolution, page order, and upload limits are checked.
|
|
24
|
+
- Minor/guardian consent, custody, medical, police, military, sponsor, and relationship evidence branches are resolved when triggered.
|
|
25
|
+
|
|
26
|
+
## Money And Timing
|
|
27
|
+
|
|
28
|
+
- Prior applications, withdrawals/cancellations, reusable fee receipts, duplicate applicant profiles, account locks, and support cases are checked before creating or paying for a new case.
|
|
29
|
+
- Government fee, service fee, currency, payment method, refundability, and receipt validity are distinguished.
|
|
30
|
+
- Appointment availability, biometrics, medicals, interviews, courier time, and processing estimates are tracked separately.
|
|
31
|
+
- All deadlines use an explicit date, time zone, owner, and next action.
|
|
32
|
+
- Evidence expiry is tracked for passports, photos, bank records, police certificates, medicals, and enrollment/employment letters.
|
|
33
|
+
|
|
34
|
+
## Consistency And Review
|
|
35
|
+
|
|
36
|
+
- Raw answers, normalized form values, and supporting documents do not conflict.
|
|
37
|
+
- Inferences and unresolved values remain visible; the agent never silently fills them.
|
|
38
|
+
- Security, criminal, immigration, health, and declaration answers are confirmed by the applicant.
|
|
39
|
+
- The applicant reviews the final preview and handles required signatures, declarations, CAPTCHA, and submission.
|
|
40
|
+
|
|
41
|
+
## After Submission And Travel
|
|
42
|
+
|
|
43
|
+
- Store application/case IDs, receipts, appointments, requests, decision, visa label/eVisa, and passport return.
|
|
44
|
+
- Verify the issued visa against name, passport, category, entries, validity, and annotations.
|
|
45
|
+
- Track pre-arrival forms, health/customs declarations, registration, reporting, work/study conditions, extension rules, and departure deadline.
|
|
46
|
+
- Make clear that a visa or authorization does not guarantee admission at the border.
|
|
47
|
+
|
|
48
|
+
## Privacy And Access
|
|
49
|
+
|
|
50
|
+
- All applicant data stays local: it lives only in the local HTML dossier and is never transmitted to any external service, logged elsewhere, or used for any purpose beyond this application. This is a hard constraint, not a user setting.
|
|
51
|
+
- Never store passwords, one-time codes, security answers, or payment-card data in the dossier.
|
|
52
|
+
- Keep the HTML as the only authoritative case record.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Create a local visa application dossier from the bundled HTML template."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
from html import escape
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from urllib.parse import urlparse
|
|
11
|
+
|
|
12
|
+
from source_registry import find_destination, load_directory, load_registry
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
16
|
+
TEMPLATE = ROOT / "assets" / "visa-dossier-template.html"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def parse_args() -> argparse.Namespace:
|
|
20
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
21
|
+
parser.add_argument("output", help="Output HTML path to create")
|
|
22
|
+
parser.add_argument("--title")
|
|
23
|
+
parser.add_argument("--country", help="Registry id, country name, or alias")
|
|
24
|
+
parser.add_argument("--destination")
|
|
25
|
+
parser.add_argument("--visa-type", default="Pending")
|
|
26
|
+
parser.add_argument("--form-name", default="Pending")
|
|
27
|
+
parser.add_argument(
|
|
28
|
+
"--application-location",
|
|
29
|
+
"--location",
|
|
30
|
+
dest="application_location",
|
|
31
|
+
default="Pending",
|
|
32
|
+
)
|
|
33
|
+
parser.add_argument("--applicant-label", default="Applicant")
|
|
34
|
+
parser.add_argument("--nationality", "--nationalities", default="Pending")
|
|
35
|
+
parser.add_argument("--passport-type", default="Pending")
|
|
36
|
+
parser.add_argument("--travel-document-issuer", default="Pending")
|
|
37
|
+
parser.add_argument("--legal-residence", default="Pending")
|
|
38
|
+
parser.add_argument("--residence-status", default="Pending")
|
|
39
|
+
parser.add_argument("--purpose", default="Pending")
|
|
40
|
+
parser.add_argument("--arrival-date", default="Pending")
|
|
41
|
+
parser.add_argument("--duration", default="Pending")
|
|
42
|
+
parser.add_argument("--entries", default="Pending")
|
|
43
|
+
parser.add_argument("--arrival-mode", default="Pending")
|
|
44
|
+
parser.add_argument("--transit", default="None declared")
|
|
45
|
+
parser.add_argument("--existing-entry-rights", default="None declared")
|
|
46
|
+
parser.add_argument("--route-verdict", default="Unresolved - live check required")
|
|
47
|
+
parser.add_argument("--live-checked-at", default="Pending")
|
|
48
|
+
parser.add_argument("--recheck-due", default="Before filing and again before departure")
|
|
49
|
+
parser.add_argument("--official-source-url")
|
|
50
|
+
return parser.parse_args()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def main() -> None:
|
|
54
|
+
args = parse_args()
|
|
55
|
+
if not TEMPLATE.exists():
|
|
56
|
+
raise SystemExit(f"Template not found: {TEMPLATE}")
|
|
57
|
+
|
|
58
|
+
output = Path(args.output).expanduser().resolve()
|
|
59
|
+
output.parent.mkdir(parents=True, exist_ok=True)
|
|
60
|
+
|
|
61
|
+
destination_match = None
|
|
62
|
+
seed = None
|
|
63
|
+
registry = load_registry()
|
|
64
|
+
directory = load_directory()
|
|
65
|
+
if args.country:
|
|
66
|
+
result = find_destination(registry, directory, args.country)
|
|
67
|
+
if not result:
|
|
68
|
+
raise SystemExit(
|
|
69
|
+
f"Unknown destination: {args.country}. "
|
|
70
|
+
"Use source_registry.py list or pass --destination."
|
|
71
|
+
)
|
|
72
|
+
destination_match, seed = result
|
|
73
|
+
|
|
74
|
+
destination = args.destination or (
|
|
75
|
+
destination_match["name"] if destination_match else "Pending"
|
|
76
|
+
)
|
|
77
|
+
official_source_url = args.official_source_url
|
|
78
|
+
if official_source_url:
|
|
79
|
+
parsed_source = urlparse(official_source_url)
|
|
80
|
+
if parsed_source.scheme != "https" or not parsed_source.netloc:
|
|
81
|
+
raise SystemExit("--official-source-url must be an https URL")
|
|
82
|
+
if not official_source_url and seed:
|
|
83
|
+
official_source_url = next(
|
|
84
|
+
source["url"]
|
|
85
|
+
for source in seed["sources"]
|
|
86
|
+
if "authoritative_rules" in source["roles"]
|
|
87
|
+
)
|
|
88
|
+
official_source_url = official_source_url or "Pending official verification"
|
|
89
|
+
official_source_href = (
|
|
90
|
+
official_source_url if official_source_url.startswith("https://") else "#"
|
|
91
|
+
)
|
|
92
|
+
if seed:
|
|
93
|
+
source_status = (
|
|
94
|
+
f"Cached official seed checked {registry['last_verified']}; "
|
|
95
|
+
"mandatory live route check pending"
|
|
96
|
+
)
|
|
97
|
+
elif destination_match:
|
|
98
|
+
source_status = "Live official-source discovery required; no static visa verdict"
|
|
99
|
+
else:
|
|
100
|
+
source_status = "Pending destination and live official verification"
|
|
101
|
+
|
|
102
|
+
title = args.title or f"{destination} Visa Application Dossier"
|
|
103
|
+
replacements = {
|
|
104
|
+
"{{TITLE}}": title,
|
|
105
|
+
"{{DESTINATION}}": destination,
|
|
106
|
+
"{{VISA_TYPE}}": args.visa_type,
|
|
107
|
+
"{{FORM_NAME}}": args.form_name,
|
|
108
|
+
"{{APPLICATION_LOCATION}}": args.application_location,
|
|
109
|
+
"{{APPLICANT_LABEL}}": args.applicant_label,
|
|
110
|
+
"{{NATIONALITY}}": args.nationality,
|
|
111
|
+
"{{PASSPORT_TYPE}}": args.passport_type,
|
|
112
|
+
"{{TRAVEL_DOCUMENT_ISSUER}}": args.travel_document_issuer,
|
|
113
|
+
"{{LEGAL_RESIDENCE}}": args.legal_residence,
|
|
114
|
+
"{{RESIDENCE_STATUS}}": args.residence_status,
|
|
115
|
+
"{{TRAVEL_PURPOSE}}": args.purpose,
|
|
116
|
+
"{{ARRIVAL_DATE}}": args.arrival_date,
|
|
117
|
+
"{{TRIP_DURATION}}": args.duration,
|
|
118
|
+
"{{ENTRY_COUNT}}": args.entries,
|
|
119
|
+
"{{ARRIVAL_MODE}}": args.arrival_mode,
|
|
120
|
+
"{{TRANSIT_ROUTE}}": args.transit,
|
|
121
|
+
"{{EXISTING_ENTRY_RIGHTS}}": args.existing_entry_rights,
|
|
122
|
+
"{{ROUTE_VERDICT}}": args.route_verdict,
|
|
123
|
+
"{{LIVE_CHECKED_AT}}": args.live_checked_at,
|
|
124
|
+
"{{RECHECK_DUE}}": args.recheck_due,
|
|
125
|
+
"{{OFFICIAL_SOURCE_URL}}": official_source_url,
|
|
126
|
+
"{{OFFICIAL_SOURCE_HREF}}": official_source_href,
|
|
127
|
+
"{{SOURCE_VERIFICATION_STATUS}}": source_status,
|
|
128
|
+
"{{GENERATED_AT}}": datetime.now().strftime("%Y-%m-%d %H:%M"),
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
html = TEMPLATE.read_text(encoding="utf-8")
|
|
132
|
+
for key, value in replacements.items():
|
|
133
|
+
html = html.replace(key, escape(value, quote=True))
|
|
134
|
+
|
|
135
|
+
output.write_text(html, encoding="utf-8")
|
|
136
|
+
print(output)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if __name__ == "__main__":
|
|
140
|
+
main()
|