From 758529dee47f3f634d58670e801f587b41d76b3e Mon Sep 17 00:00:00 2001 From: Steven Welch Date: Sun, 30 Aug 2026 16:14:10 -0600 Subject: [PATCH] opencode-server: require agents to fetch and apply PR templates GitHub applies pull request templates only in the web UI; API-created pull requests bypass them. Add a fetch-and-fill mandate to the shared server instructions ("Repository and pull-request workflow"): before opening a PR, agents fetch the repository template (falling back to the organization default at makeitworkcloud/.github) and use it as the body skeleton with all headings preserved and placeholders replaced. Bump chart to 0.1.20; OCI chart versions are immutable. The ConfigMap renders files/AGENTS.md via .Files.Get, so no template change is needed. --- opencode-server/Chart.yaml | 2 +- opencode-server/files/AGENTS.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/opencode-server/Chart.yaml b/opencode-server/Chart.yaml index 730a323..1067eb6 100644 --- a/opencode-server/Chart.yaml +++ b/opencode-server/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opencode-server description: OpenCode server Deployment and non-secret configuration -version: 0.1.19 +version: 0.1.20 appVersion: "1.18.23" type: application diff --git a/opencode-server/files/AGENTS.md b/opencode-server/files/AGENTS.md index 86b21e3..4f796f7 100644 --- a/opencode-server/files/AGENTS.md +++ b/opencode-server/files/AGENTS.md @@ -182,6 +182,8 @@ Never use evidence from one stage to claim a later stage. Label important conclu - Inspect only dependency, action, image, chart, hook, or tool pins affected by the change or needed to establish compatibility. Do not add unrelated update churn. - Before publishing, inspect proposed content for secrets, state, kubeconfig material, decrypted values, tokens, credentials, private keys, and sensitive plans or logs. - For an authorized code change, create a scoped branch, commit, push, and open a pull request without requesting separate permission. Inspect protected-branch metadata and pull-request templates first. +- Pull request templates are applied only by the GitHub web UI; API-created pull requests bypass them, so agents must apply templates manually. Before opening a pull request, fetch the template with `github_get_file_contents`: the repository's `.github/PULL_REQUEST_TEMPLATE.md` first, then the root and `docs/` variants (filenames are case-insensitive), then the organization default at `makeitworkcloud/.github` (`.github/PULL_REQUEST_TEMPLATE.md`). +- Use the fetched template as the pull request body skeleton: preserve every heading, fill each section, replace placeholders such as `Fixes #`, and remove HTML comments. If no template exists in any location, state that in the pull request body instead of writing a free-form description. - Explicit user confirmation is required before merging, publishing, dispatching a workflow, deploying, mutating a live system, or taking a destructive action. Never bypass branch protections or required checks. - After creating or updating a pull request, monitor check runs and commit statuses until terminal. Diagnose failures from checks, workflow configuration, changed files, and available CI output; make only the narrowest safe fix on the same branch. Never weaken or dismiss a required check. - When no checks exist or required evidence is inaccessible, report that concrete limitation rather than claiming validation.