diff --git a/Makefile b/Makefile index 861f424..130951d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: changed-charts list-charts list-charts-json package-chart test +.PHONY: changed-charts list-charts list-charts-json package-chart test test-opencode-server-agents SHELL := /bin/bash CHARTS := $(shell find . -maxdepth 2 -name Chart.yaml -printf '%h\n' | cut -d'/' -f2 | sort -u) @@ -19,3 +19,25 @@ package-chart: test: @for chart in $(CHARTS); do helm lint --strict "$$chart" && helm template test "$$chart" > /dev/null; done + @$(MAKE) test-opencode-server-agents + +test-opencode-server-agents: + @set -euo pipefail; \ + expected="$$(printf '%s\n' '---' "description: Use for bounded generic coding, debugging, or repository tasks when the assigning primary agent's execution budget is nearing completion or it otherwise needs execution capacity; the primary retains task interpretation, safety, delivery decisions, and final synthesis" 'mode: subagent' 'model: openai/gpt-5.6-terra' 'variant: default' '---')"; \ + test "$$(cat opencode-server/files/agents/terra.md)" = "$$expected"; \ + grep -Fqx 'version: 0.2.0' opencode-server/Chart.yaml; \ + grep -Fqx ' "default_agent": "default",' opencode-server/files/opencode.json; \ + rendered="$$(helm template test opencode-server)"; \ + echo "$$rendered" | grep -Fqx ' terra.md: |-'; \ + echo "$$rendered" | grep -Fqx " description: Use for bounded generic coding, debugging, or repository tasks when the assigning primary agent's execution budget is nearing completion or it otherwise needs execution capacity; the primary retains task interpretation, safety, delivery decisions, and final synthesis"; \ + echo "$$rendered" | grep -Fqx ' mode: subagent'; \ + echo "$$rendered" | grep -Fqx ' model: openai/gpt-5.6-terra'; \ + echo "$$rendered" | grep -Fqx ' variant: default'; \ + echo "$$rendered" | grep -Fqx ' - key: terra.md'; \ + echo "$$rendered" | grep -Fqx ' path: agents/terra.md'; \ + archive_dir="$$(mktemp -d)"; \ + trap 'rm -rf "$$archive_dir"' EXIT; \ + helm package opencode-server --destination "$$archive_dir" > /dev/null; \ + archive="$$(find "$$archive_dir" -maxdepth 1 -type f -name 'opencode-server-0.2.0.tgz' -print -quit)"; \ + test -n "$$archive"; \ + tar -tzf "$$archive" | grep -Fqx 'opencode-server/files/agents/terra.md' diff --git a/opencode-server/Chart.yaml b/opencode-server/Chart.yaml index 3968e7c..0d7387f 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.78 +version: 0.2.0 appVersion: "1.18.29" type: application diff --git a/opencode-server/README.md b/opencode-server/README.md index d423cdf..9ddc1d4 100644 --- a/opencode-server/README.md +++ b/opencode-server/README.md @@ -14,7 +14,7 @@ The chart copies these immutable package inputs into `/home/opencode/.config/ope - `files/opencode.json` — providers, enabled MCP integrations, default agent, and global OpenCode configuration - `files/AGENTS.md` — shared instructions loaded by every agent -- `files/agents/*.md` — owner-specific primary agents, model-backed subagents for delegated passes, and specialized read-only SDLC subagents (adversarial code review, QA coverage and documentation adequacy, release readiness, infrastructure security, documentation drafting) +- `files/agents/*.md` — owner-specific primary agents, the generic `terra` execution subagent, model-backed subagents for delegated passes, and specialized read-only SDLC subagents (adversarial code review, QA coverage and documentation adequacy, release readiness, infrastructure security, documentation drafting) - `files/skills/*/SKILL.md` — specialized operational workflows A change to any packaged file is chart content and requires a new `Chart.yaml` version. See [Agent instruction architecture](docs/agent-instruction-architecture.md) for the primary-agent, subagent, and shared-instruction design. diff --git a/opencode-server/docs/agent-instruction-architecture.md b/opencode-server/docs/agent-instruction-architecture.md index 232afa0..417cace 100644 --- a/opencode-server/docs/agent-instruction-architecture.md +++ b/opencode-server/docs/agent-instruction-architecture.md @@ -85,6 +85,14 @@ interpretation, architecture, safety, cross-repository impact, mutation authorization, and final synthesis; it verifies material findings. Independent scopes may run in parallel. +[`files/agents/terra.md`](../files/agents/terra.md) defines `terra`, a +full-capability, generic execution subagent using `openai/gpt-5.6-terra` with +the default variant. A primary may select it for bounded coding, debugging, or +repository tasks when it needs execution capacity. It does not change the +`default` primary-agent selection or delegate primary ownership; the assigning +primary must supply authority, scope, safety constraints, and completion +criteria in the task prompt. + The repository-capable `kimi` and `kimi-256k` subagents include a compact, self-contained `codebase-memory` and GitHub routing rule because they may perform bounded repository passes. Other subagents receive their authoritative sources, diff --git a/opencode-server/files/agents/terra.md b/opencode-server/files/agents/terra.md new file mode 100644 index 0000000..649a83f --- /dev/null +++ b/opencode-server/files/agents/terra.md @@ -0,0 +1,6 @@ +--- +description: Use for bounded generic coding, debugging, or repository tasks when the assigning primary agent's execution budget is nearing completion or it otherwise needs execution capacity; the primary retains task interpretation, safety, delivery decisions, and final synthesis +mode: subagent +model: openai/gpt-5.6-terra +variant: default +---