Set up VS Code and the AI workflow for the mod #5

Closed
opened 2026-10-04 19:53:50 +00:00 by haylan · 1 comment
Owner

Part of #1
Blocked by: #3

Question

Decide the VS Code setup (extensions, LSP, tasks) and how the AI is given context (captured docs, CLAUDE.md conventions, type definitions) so it can write and check mod scripts well.

Part of #1 Blocked by: #3 ## Question Decide the VS Code setup (extensions, LSP, tasks) and how the AI is given context (captured docs, CLAUDE.md conventions, type definitions) so it can write and check mod scripts well.
haylan added the wayfinder:grilling label 2026-10-04 19:53:50 +00:00
haylan self-assigned this 2026-10-04 20:27:50 +00:00
Author
Owner

Resolution

Editor and AI workflow, decided:

  • Teal config: tlconfig.lua, all_def.tl and .vscode/ live at the repo root (not in mod/, so the game never loads them), based on the game's vscode-template. Committed as a template plus a gitignored local copy that holds this machine's install path (D:/SteamLibrary/steamapps/common/Transport Fever 3/).
  • Tooling: install the VS Code extension pdesaulniers.vscode-teal (sumneko.lua is already installed) and the Teal compiler tl, used for type-checking only (tl check), since whether the game compiles .tl itself is undocumented.
  • AI context:
    • bring the offline docs (docs/reference/ from research/mod-tooling) onto main;
    • add a "Modding" section to CLAUDE.md (Teal, the mod/ layout, how to run tl check, "read the offline docs before guessing an API");
    • give the AI read access to the install's api/tealdef and base/tealdef via additionalDirectories in .claude/settings.json; these are the authoritative API types.
  • Repo baseline: make an initial commit on main (CLAUDE.md, CONTEXT.md, docs/agents/), merge both research branches into it (unrelated histories). Pushing main is left to the human.
  • Applying all of this is the follow-up task ticket "Apply the VS Code and AI workflow setup".
## Resolution **Editor and AI workflow, decided:** - **Teal config:** `tlconfig.lua`, `all_def.tl` and `.vscode/` live at the repo root (not in `mod/`, so the game never loads them), based on the game's `vscode-template`. Committed as a template plus a gitignored local copy that holds this machine's install path (`D:/SteamLibrary/steamapps/common/Transport Fever 3/`). - **Tooling:** install the VS Code extension `pdesaulniers.vscode-teal` (`sumneko.lua` is already installed) and the Teal compiler `tl`, used for type-checking only (`tl check`), since whether the game compiles `.tl` itself is undocumented. - **AI context:** - bring the offline docs (`docs/reference/` from `research/mod-tooling`) onto `main`; - add a "Modding" section to `CLAUDE.md` (Teal, the `mod/` layout, how to run `tl check`, "read the offline docs before guessing an API"); - give the AI read access to the install's `api/tealdef` and `base/tealdef` via `additionalDirectories` in `.claude/settings.json`; these are the authoritative API types. - **Repo baseline:** make an initial commit on `main` (`CLAUDE.md`, `CONTEXT.md`, `docs/agents/`), merge both research branches into it (unrelated histories). Pushing `main` is left to the human. - Applying all of this is the follow-up task ticket "Apply the VS Code and AI workflow setup".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haylan/tpf3-overtake#5