Thank you for your interest in contributing to the Open Travel AI Platform.
- Node.js >= 24
- pnpm 10 (
corepack enable && corepack prepare pnpm@10.33.0 --activate) - TypeScript strict mode — no
anytypes, no implicit returns
pnpm install
pnpm run data:download # fetch reference datasets
pnpm run lint # ESLint with type-checked rules
pnpm run typecheck # TypeScript strict
pnpm test # vitestCI must pass before merge. The pipeline runs lint, typecheck, data download, and tests on every push and PR.
-
Write a spec first. Create a YAML spec in
agents/specs/following the existing format. Specs define input/output types, reference data sources, confidence scoring, and test cases. -
Get domain review. Travel domain logic must come from industry experts, published standards (IATA, ATPCO, ISO), or authoritative data sources. Do not invent domain rules.
-
Implement the agent. Follow the structure in
packages/agents/reference/src/airport-code-resolver/:types.ts— Input/output types with JSDocdata.tsordata-loader.ts— Reference dataresolver.tsor equivalent — Core logicindex.ts— Agent class implementingAgent<TInput, TOutput>from@otaip/core__tests__/*.test.ts— 15+ tests minimum
-
Re-export from
packages/agents/reference/src/index.ts. -
Run the full CI locally before pushing:
pnpm run lint && pnpm run typecheck && pnpm test
- TypeScript strict —
strict: true,noUncheckedIndexedAccess,noImplicitOverride - No
any— useunknown, proper types, or generics - ESM imports — use
.jsextensions in import paths - Agent interface — every agent implements
initialize(),execute(),health() - Error handling — use
AgentNotInitializedError,AgentInputValidationError,AgentDataUnavailableErrorfrom@otaip/core - Confidence scores — 1.0 exact match, 0.5-0.9 partial, 0 not found
Where domain input is needed but not yet available, mark it with a TODO comment:
// TODO: [NEEDS DOMAIN INPUT] Carrier-specific fare filing data
// required for complete booking class mappings.Do not invent travel industry logic. Incorrect domain rules in airline systems can cause real operational issues. When in doubt, leave a TODO and document what source would provide the correct data.
Use clear, imperative commit messages:
Add Agent 0.2: Airline Code & Alliance MapperFix IATA code lookup for decommissioned airportsUpdate Star Alliance membership list
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.