Add Go as a supported output language#1
Open
jarsh921 wants to merge 4 commits into
Open
Conversation
added 2 commits
July 21, 2026 14:21
Follows the exact same pattern as python/javascript/typescript:
- New prompt partial (prompts/partials/_language_go.md): prefer the
standard library (net/http, encoding/json) over third-party deps,
reuse one http.Client across requests, hardcode auth found in the
traffic (cookies via the client's cookie jar, tokens/API keys in
headers) with the same auth-refresh-on-401/403 guidance the other
languages already have, and the same three-tier bot-detection
fallback (httpcloak -> Playwright CDP -> full browser automation).
- base_engineer.py: added "go" to _OUTPUT_LANGUAGE_EXTENSIONS (.go),
_get_language_name() ("Go"), _get_run_command() ("go run
api_client.go"), and _get_auto_output_files() (go.mod/go.sum,
conditional on external deps being needed - same posture as
javascript's package.json entry, since net/http-only Go code needs
neither).
- cli.py: added Go to the interactive `output_language` config picker.
- Updated the three docstrings/comments that listed the language set
(config.py, engineer.py, prompts/__init__.py) and README.md's output
language line.
- Tests: mirrored the existing per-language test pattern in
test_base_engineer.py (extension, run command, prompt content) and
test_prompts.py (partial loading) for Go.
Full test suite passes (49/49 in the touched files; the 4 failures
elsewhere are pre-existing on main, unrelated to this change - TTY
detection and a Windows path-separator assertion). ruff check is clean
on every file this touches (8 pre-existing lint errors elsewhere on
main, none in the touched lines).
jarsh921
force-pushed
the
add-go-output-language
branch
from
July 21, 2026 18:22
80abc60 to
30b8dee
Compare
Flagged independently by two review bots (greptile-apps, cubic-dev-ai)
on the PR: the partial's first bullet told the model the default was
a single "main.go", but the actual save path
({scripts_dir}/{client_filename}) and run command (go run
api_client.go) both resolve to api_client.go - if the model had
followed the main.go instruction literally, the run command would
fail to find the file it just wrote. Replaced the specific (wrong)
filename with a generic "single-file program" description, matching
how the Java/C# partials already describe their own output files
without hardcoding a filename that could drift from the real one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.