diff --git a/.github/ISSUE_TEMPLATE/agent-change.md b/.github/ISSUE_TEMPLATE/agent-change.md index e368fe2..772cd8a 100644 --- a/.github/ISSUE_TEMPLATE/agent-change.md +++ b/.github/ISSUE_TEMPLATE/agent-change.md @@ -24,4 +24,4 @@ title: "[Agent] " - + diff --git a/.github/workflows/agent-issue-trigger.yml b/.github/workflows/agent-issue-trigger.yml index 4340839..84f865d 100644 --- a/.github/workflows/agent-issue-trigger.yml +++ b/.github/workflows/agent-issue-trigger.yml @@ -41,8 +41,16 @@ jobs: issue_json="$(gh api "repos/opensensor/django-forms-workflows/issues/${ISSUE_NUMBER}")" issue_title="$(jq -r .title <<< "$issue_json")" issue_body="$(jq -r '.body // "" | .[0:16000]' <<< "$issue_json")" + model="glm-5.3" + spec="automation/agent-harness/glm.yaml" + if jq -e '.labels | any(.name == "agent-kimi")' <<< "$issue_json" >/dev/null; then + model="kimi-k3" + spec="automation/agent-harness/kimi.yaml" + fi + echo "Launching issue #${ISSUE_NUMBER} with ${model}" + echo "Issue #${ISSUE_NUMBER}: ${model}" >> "$GITHUB_STEP_SUMMARY" session_json="$(doctl harness-runtime create \ - --spec automation/agent-harness/kimi.yaml \ + --spec "$spec" \ --name "$session_name" \ --interactive=false -o json)" session_id="$(jq -r '.session_id // empty' <<< "$session_json")" diff --git a/automation/agent-harness/README.md b/automation/agent-harness/README.md index 7cba0d0..92d89c3 100644 --- a/automation/agent-harness/README.md +++ b/automation/agent-harness/README.md @@ -1,6 +1,6 @@ # Issue agent pilot -A maintainer can apply `agent-candidate` to a scoped public issue to start one DigitalOcean Harness Runtime session. The session uses Kimi K3 with automatic tool approval, edits a clone of this repository, and pushes `agent/issue--` to the dedicated `matteius/django-forms-workflows` fork. GitHub Actions is disabled on that fork. A signed push webhook asks the shared PR broker to open a regular pull request against `opensensor/django-forms-workflows` main. The repository's existing PR CI then runs; a maintainer reviews and merges manually. The agent cannot push to the base repository. +A maintainer can apply `agent-candidate` to a scoped public issue to start one DigitalOcean Harness Runtime session. The session uses GLM-5.3 by default with automatic tool approval. Apply `agent-kimi` before `agent-candidate` for harder or image-based work to select Kimi K3. The model is selected once when the session starts. The agent edits a clone of this repository and pushes `agent/issue--` to the dedicated `matteius/django-forms-workflows` fork. GitHub Actions is disabled on that fork. A signed push webhook asks the shared PR broker to open a regular pull request against `opensensor/django-forms-workflows` main. The repository's existing PR CI then runs; a maintainer reviews and merges manually. The agent cannot push to the base repository. The launcher exits after submitting the prompt; it does not keep a runner occupied while the agent works. Applying the label again launches another session. Remove the label to prevent a delayed fork push from opening a PR. Use the `Agent-ready change` issue template to give the agent clear acceptance criteria and validation steps. diff --git a/automation/agent-harness/glm.yaml b/automation/agent-harness/glm.yaml new file mode 100644 index 0000000..247c7f2 --- /dev/null +++ b/automation/agent-harness/glm.yaml @@ -0,0 +1,13 @@ +name: django-forms-public-issue-glm +agent: opencode +size: mars-2vcpu-4gb +idle_timeout: 30m +repos: + - opensensor/django-forms-workflows +env: + HARNESS_INFERENCE_MODEL: glm-5.3 +secrets: + HARNESS_INFERENCE_API_KEY: ${HARNESS_INFERENCE_API_KEY} + GIT_DEPLOY_KEY_B64: ${GIT_DEPLOY_KEY_B64} +permissions: + default: allow