deploy: combined opencode image + k8s + docs

- pilot/Dockerfile: python:3.12-slim + node 20 + opencode-ai@1.3.10 +
  ripgrep + pyright/typescript-language-server/eslint (npm) + ruff (pip).
  Factory + pilot scripts baked at /app. imagePullPolicy: Never (local
  import into microk8s containerd).
- .dockerignore: lean build context.
- ~/k8s/pragent-webhook.yaml: image pragent-webhook:opencode, emptyDir work
  at /tmp/pragent-work, env (PRAGENT_ENGINE, OPENCODE_MODEL, PRAGENT_FACTORY_DIR,
  PRAGENT_OPENCODE_BIN, PRAGENT_WORK_ROOT, PRAGENT_RTK_DIR='', timeout 540),
  resources 200m/512Mi -> 1500m/2Gi. Drops the ConfigMap scripts volume.
- pilot/README-webhook.md + .opencode/README.md: opencode engine section,
  build/import/apply steps, factory guide fixes (parse_review_output, steps).

Image builds (1.62GB, smoke-tested: opencode+LSPs+factory+env all present).
Import into microk8s containerd + apply pending (ctr needs sudo).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marcos
2026-08-17 23:11:58 +00:00
parent 6e3a9eb5b0
commit 8912f6721b
4 changed files with 162 additions and 16 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ flowchart TD
DROP --> OC["opencode run --pure --agent pragent --dir <workdir><br/>--model headroom/glm-5.2:cloud"]
OC --> PR["pragent primary<br/>load skills · run linters · read code · delegate lenses"]
PR --> JSON["final message: summary + ```json findings```"]
JSON --> PARSE["ai_review.extract_findings<br/>{summary, findings}"]
JSON --> PARSE["ai_review.parse_review_output<br/>{summary, findings}"]
PARSE --> ANCHOR["parse_diff_anchors → split_findings"]
ANCHOR --> POST["post_inline_review<br/>summary + inline ```suggestion + ref links + sha marker"]
```
@@ -48,7 +48,7 @@ flowchart TD
The `pragent` primary does the whole review in one pass for small/medium diffs
(no subagent calls). It delegates to `@security` / `@tests` / `@perf` subagents
ONLY on large (>~400 lines) or security-sensitive diffs. Token cost scales with
PR size. `subagent_depth: 2` caps recursion.
PR size. Subagent recursion is capped by the primary's `steps` budget.
`--pure` is passed at runtime so the reviewer doesn't load the host user's heavy
global opencode plugins (supermemory/dcp/morph/pty) which hang cold-start. In the