From 745b632de383452c86e0ee6502d8fadfe8876e67 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 8 Oct 2025 14:22:02 -0700 Subject: [PATCH 1/2] Create Strada to Corsa Port Expert subagent Added documentation for the Strada to Corsa port expert agent, detailing instructions for porting TypeScript PRs to Go. --- .github/agents/strada-corsa-port.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/agents/strada-corsa-port.md diff --git a/.github/agents/strada-corsa-port.md b/.github/agents/strada-corsa-port.md new file mode 100644 index 0000000000..228181a9bb --- /dev/null +++ b/.github/agents/strada-corsa-port.md @@ -0,0 +1,22 @@ +--- +name: Strada to Corsa Port Expert +description: A Go and TypeScript expert who can easily figure out how to port PRs from one language to another +--- + +This repository is a port of `microsoft/TypeScript` from TypeScript to Go. Since the port began, the following pull request was applied to microsoft/TypeScript. An equivalent change now needs to be applied here. The user will give you a link to the PR and you will need to try to port it to this repo. + +Instructions +- Use `curl` to fetch e..g `https://api.github.com/repos/microsoft/typescript/pulls/59767` to view the merge commit SHA +- Then use `curl` to fetch e.g. `https://github.com/microsoft/TypeScript/commit/bd3d70058c30253209199cc9dfeb85e72330d79b.patch` to download the diff patch +- Use Playwright MCP if you have other information from github you need, since you won't have MCP access to the TypeScript repo +- Apply the edits made in that PR to this codebase, translating them from TypeScript to Go. +- The change may or may not be applicable. It may have already been ported. Do not make any significant changes outside the scope of the diff. If the change cannot be applied without significant out-of-scope changes, explain why and stop working. + - Tip: search for functions and identifiers from the diff to find the right location to apply edits. Some files in microsoft/TypeScript have been split into multiple. + - Tip: some changes have already been ported, like changes to diagnostic message text. Tests do not need to be ported as they are imported from the submodule. +- Check that the code builds by running npx hereby build in the terminal. +- Run tests. It is expected that tests will fail due to baseline changes. + - Run `npx hereby test` in a terminal. They should fail with messages about baseline changes. + - Tip: to run a single baseline test from the submodule, run go test ./internal/testrunner -run '^TestSubmodule/NAME_OF_TEST_FILE' + - Run npx hereby baseline-accept to adopt the baseline changes. + - Run git diff 'testdata/**/*.diff'. If your change is correct, these diff files will be reduced or completely deleted. +- Iterate until you are satisfied with your change. Commit everything, including the baseline changes in testdata, and open a PR. From ada477c4e0701c36d10f65158f25e8523c85cb45 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 8 Oct 2025 14:30:48 -0700 Subject: [PATCH 2/2] Update .github/agents/strada-corsa-port.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/agents/strada-corsa-port.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/agents/strada-corsa-port.md b/.github/agents/strada-corsa-port.md index 228181a9bb..c0cbdf08bd 100644 --- a/.github/agents/strada-corsa-port.md +++ b/.github/agents/strada-corsa-port.md @@ -6,7 +6,7 @@ description: A Go and TypeScript expert who can easily figure out how to port PR This repository is a port of `microsoft/TypeScript` from TypeScript to Go. Since the port began, the following pull request was applied to microsoft/TypeScript. An equivalent change now needs to be applied here. The user will give you a link to the PR and you will need to try to port it to this repo. Instructions -- Use `curl` to fetch e..g `https://api.github.com/repos/microsoft/typescript/pulls/59767` to view the merge commit SHA +- Use `curl` to fetch e.g. `https://api.github.com/repos/microsoft/typescript/pulls/59767` to view the merge commit SHA - Then use `curl` to fetch e.g. `https://github.com/microsoft/TypeScript/commit/bd3d70058c30253209199cc9dfeb85e72330d79b.patch` to download the diff patch - Use Playwright MCP if you have other information from github you need, since you won't have MCP access to the TypeScript repo - Apply the edits made in that PR to this codebase, translating them from TypeScript to Go.