Contributing
Contributions are welcome. Open an issue or a pull request at github.com/eins78/meteoswiss-llm-tools.
Before you push
Section titled “Before you push”pnpm --filter meteoswiss-mcp run fix && pnpm --filter meteoswiss-mcp run cifix applies formatting and auto-fixable lint rules; ci runs lint, build and tests.
Code conventions (TypeScript)
Section titled “Code conventions (TypeScript)”- ES modules; imports use
.jsextensions even for.tsfiles, and Node built-ins use thenode:prefix. - Type-only imports use the
typekeyword. - Production code is strict: avoid
!,asandany; useunknownfor external data and provide type guards. - No TypeScript
enum; useas constobjects or arrays. - Prefer domain types (for example a
Languageunion) to loosestring. - Explicit return types, and JSDoc on exported functions.
- Names:
camelCasefor values,PascalCasefor types and classes,UPPER_CASEfor constants,kebab-casefor files and folders.
Adding or changing a tool
Section titled “Adding or changing a tool”- Define the Zod input and output schemas in
src/schemas/and export the response type withz.infer. - Implement the logic in
src/tools/orsrc/data/. - Register it in
src/server.tswithregisterTool(name, { description, inputSchema, outputSchema }, handler)and returnstructuredContent. - Add integration tests with fixtures (see Testing).
- Keep the skill in step: run
pnpm --filter meteoswiss-mcp run parity:update, add a<!-- mcp-tool: name -->marker to the matching section of the skill, or record a deliberate exclusion inparity/parity-exceptions.yml. - Update the tools reference on this site.
- Add a changeset (release process).
Documentation
Section titled “Documentation”This site lives in packages/meteoswiss-docs-site/. The user, operator and development pages are hand-written Markdown under
src/content/docs/. The eval runs and the skill-vs-MCP case study are copied in at build time from their source files, so edit those at the
source. Preview locally with:
cd packages/meteoswiss-docs-sitepnpm installpnpm run devDocumentation must follow the code: when they disagree, fix the docs. Refer to the product as the “MeteoSwiss app and website” when describing what the data powers.
Branches and commits
Section titled “Branches and commits”Branch prefixes: feature/, bug/, docs/, infra/, idea/. Planning documents live in docs/plans/; session logs in docs/sessionlogs/.