pflow-golang-setup
If setup-context.sh fails (non-zero exit or "status":"error" in its JSON) print ⚠️ <error.message> and stop. Other failing commands are findings — report and continue.
Steps
-
Run
.agents/skills/pflow-golang-setup/scripts/setup-context.sh→{go_version, toolchain, golangci_config, golangci_config_version, task_runner, github_workflows[], remote_host, dirs[], main_packages, files_present[], go_tools, dependabot, renovate, missing[]}. -
Tell the user what exists and what
missinglists. Ask which gaps to fill; never overwrite an existing file — propose a diff instead. -
Read the reference for each chosen item and generate the files:
Item Read New project, directory structure, multiple binaries, monorepo layout.mdgo.mod,goline,tooldirectives, versions, vendoringgo-mod.md.golangci.yml(v2), formatters,nolintpolicygolangci.mdTaskfile / Makefile: build, test, lint, race, coverage, gate task-runner.mdCI workflow, caching, release, Dependabot/Renovate (when remote_hostisgithub)ci-github-actions.md -
Match the project's existing choices: same task runner, same Go version as
go_version, same generator tools fromgo_tools. Every generated gate must run locally with one command (task check/make check) and identically in CI. -
Finish by running the new gate once and reporting the result, or listing the exact command the user should run if it needs tools not installed.