Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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'
2 changes: 1 addition & 1 deletion opencode-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion opencode-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions opencode-server/docs/agent-instruction-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions opencode-server/files/agents/terra.md
Original file line number Diff line number Diff line change
@@ -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
---