From 1e34fb8d84e80d57e1a6aa0dd662003c82e33408 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Mon, 29 Jun 2026 16:36:05 -0700 Subject: [PATCH 1/4] =?UTF-8?q?ci(bots):=20bump=20bot-engine=20ENGINE=5FRE?= =?UTF-8?q?F=20to=2011f9bc8=20(#84=20=E2=80=94=20followup=20context-repos)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Picks up engine #84: the follow-up flow now wires the .bot/context-repos.yaml allowlist into its agent (parity with the author phase), so a review-comment reply can fetch/read reference repos (e.g. databricks-jdbc) to VERIFY a cross-driver parity claim instead of answering from memory (the gap behind the #544 JDBC answer). All four workflows bumped in lockstep. Co-authored-by: Isaac --- .github/workflows/engineer-bot-followup.yml | 2 +- .github/workflows/engineer-bot.yaml | 2 +- .github/workflows/reviewer-bot-followup.yml | 2 +- .github/workflows/reviewer-bot.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/engineer-bot-followup.yml b/.github/workflows/engineer-bot-followup.yml index ded45be7..7c295829 100644 --- a/.github/workflows/engineer-bot-followup.yml +++ b/.github/workflows/engineer-bot-followup.yml @@ -203,7 +203,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: e6994fa3ca073d2281a0bf1aa6c7d9db6251ca89 + ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/engineer-bot.yaml b/.github/workflows/engineer-bot.yaml index 6b9c87ee..d5d89136 100644 --- a/.github/workflows/engineer-bot.yaml +++ b/.github/workflows/engineer-bot.yaml @@ -133,7 +133,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: e6994fa3ca073d2281a0bf1aa6c7d9db6251ca89 + ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot-followup.yml b/.github/workflows/reviewer-bot-followup.yml index 6ce64862..4b078d94 100644 --- a/.github/workflows/reviewer-bot-followup.yml +++ b/.github/workflows/reviewer-bot-followup.yml @@ -176,7 +176,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: e6994fa3ca073d2281a0bf1aa6c7d9db6251ca89 + ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot.yml b/.github/workflows/reviewer-bot.yml index a5ada48f..e286899d 100644 --- a/.github/workflows/reviewer-bot.yml +++ b/.github/workflows/reviewer-bot.yml @@ -107,7 +107,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: e6994fa3ca073d2281a0bf1aa6c7d9db6251ca89 + ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" From 4d58874f04d8588a9f31671470b1a7bc10d57625 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Wed, 1 Jul 2026 10:13:18 -0700 Subject: [PATCH 2/4] ci(bots): bump ENGINE_REF to 45fd59f (engine #85 + #87) + drop dead followup config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-targets the ENGINE_REF bump from 11f9bc8 (#84) to the current engine main HEAD 45fd59f, adopting #85 (unified-config groundwork; env-only reviewer rules/skills; config-only identity) and #87 (reviewer stays zero-config). All four workflow pins updated in sync. Also aligns .bot/config.yaml with what the engine actually consumes: removes the `followup:` block. The engine reads NO followup block (bot_config.py parses only `author:` + shared keys, verified at 45fd59f) — the follow-up phase uses .bot/prompts/followup_system.md + the PR thread + author.knowledge_log. The block (and its unresolved `# VERIFY` comment) was dead config; replaced with a note. Co-authored-by: Isaac --- .bot/config.yaml | 21 ++++++--------------- .github/workflows/engineer-bot-followup.yml | 2 +- .github/workflows/engineer-bot.yaml | 2 +- .github/workflows/reviewer-bot-followup.yml | 2 +- .github/workflows/reviewer-bot.yml | 2 +- 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.bot/config.yaml b/.bot/config.yaml index 6de59aac..10529bef 100644 --- a/.bot/config.yaml +++ b/.bot/config.yaml @@ -96,21 +96,12 @@ author: # follow-up: needs a `retrospective:` block + a learning workflow, neither wired # yet — grow this file by hand for now.) -# Follow-up phase: woken by engineer-bot-followup.yml (a review comment on, or -# the `engineer-bot` label applied to, one of the bot's fix PRs). The prompt is -# rendered from followup_user.md; tokens are the PR being followed up on. The -# engine reads followup_system.md (no longer the "phase unused" placeholder) as -# the system prompt. TRIGGER_COMMENT_ID is empty on the labeled path (catch-up -# mode) — followup_user.md handles that case. -followup: - user_prompt_template: prompts/followup_user.md - env_tokens: # {{...}} in followup_user.md <- env vars (set by the workflow) - pr_number: PR_NUMBER - trigger_comment_id: TRIGGER_COMMENT_ID - head_branch: HEAD_BRANCH - # VERIFY: confirm the engine's followup phase expects exactly these keys - # (max_turns / user_prompt_template / env_tokens, same shape as `author:`) and - # that the bug-fix flow drives `--phase followup`; adjust to match the engine. +# Follow-up phase (engineer-bot-followup.yml): NO config block. The engine reads +# no `followup:` key — bot_config.py parses only `author:` + the shared top-level +# keys. The follow-up phase uses .bot/prompts/followup_system.md as its system +# prompt, builds its user prompt from the PR review thread, and reuses +# author.knowledge_log — so a `followup:` block here would be dead config. +# (prompts/followup_user.md is likewise unrendered by the engine.) # The bug-fix flow (engine: flows/bug_fix.py): the engine appends the # "write a failing test → fix the CODE → re-run until green; don't weaken the diff --git a/.github/workflows/engineer-bot-followup.yml b/.github/workflows/engineer-bot-followup.yml index 7c295829..81e7765f 100644 --- a/.github/workflows/engineer-bot-followup.yml +++ b/.github/workflows/engineer-bot-followup.yml @@ -203,7 +203,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 + ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/engineer-bot.yaml b/.github/workflows/engineer-bot.yaml index d5d89136..e242602d 100644 --- a/.github/workflows/engineer-bot.yaml +++ b/.github/workflows/engineer-bot.yaml @@ -133,7 +133,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 + ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot-followup.yml b/.github/workflows/reviewer-bot-followup.yml index 4b078d94..994a668c 100644 --- a/.github/workflows/reviewer-bot-followup.yml +++ b/.github/workflows/reviewer-bot-followup.yml @@ -176,7 +176,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 + ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot.yml b/.github/workflows/reviewer-bot.yml index e286899d..e56817f4 100644 --- a/.github/workflows/reviewer-bot.yml +++ b/.github/workflows/reviewer-bot.yml @@ -107,7 +107,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 11f9bc8dd630aeab7ff4c192807e6c09ffcbcee8 + ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" From a9c6dcb3e64699bec168314e37efc272e377a6a8 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Wed, 1 Jul 2026 10:42:43 -0700 Subject: [PATCH 3/4] docs(.bot): document the reviewer's (no-)config surface as comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Templatize .bot/config.yaml so it maps the whole bot setup. Adds a commented "Reviewer bots" section explaining the reviewer reads NOTHING from this file (engine-owned prompts; customized via .bot/prompts/review*_system.md files + REPO_RULES_FILES / REPO_SKILLS workflow env), with an explicit "do NOT add a review: block — it's dead config" warning. Comments only, never real keys, so we don't reintroduce the dead-config trap we just removed for `followup:`. Co-authored-by: Isaac --- .bot/config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.bot/config.yaml b/.bot/config.yaml index 10529bef..09a4c748 100644 --- a/.bot/config.yaml +++ b/.bot/config.yaml @@ -107,3 +107,16 @@ author: # "write a failing test → fix the CODE → re-run until green; don't weaken the # test" instruction and forces a {outcome, reason, red_green_tests} result. flow: bug-fix + +# ─── Reviewer bots (review / review-followup) — NOT configured here ────────── +# Documented for completeness (this file is the whole bot setup), but the reviewer +# reads NOTHING from .bot/config.yaml: the engine's bot_config.py parses only the +# `author:` block + the shared top-level keys above. Reviewer prompts are +# engine-owned; customize the reviewer via these (files/env — never config keys): +# - prompt overrides — optional FILES read from the checkout: +# .bot/prompts/review_system.md (appended to the review prompt) +# .bot/prompts/review_followup_system.md (appended to the follow-up prompt) +# - repo conventions — REPO_RULES_FILES env, set in reviewer-bot.yml / -followup.yml +# - native skills — REPO_SKILLS env, set in those same workflows +# Do NOT add a `review:` / `review_followup:` block here — the engine would ignore +# it (dead config), exactly like a `followup:` block. From aff1fe01fe853c5d29182573040baaa79bc85876 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Wed, 1 Jul 2026 15:59:15 -0700 Subject: [PATCH 4/4] =?UTF-8?q?ci(bots):=20adopt=20engine=20#88=20?= =?UTF-8?q?=E2=80=94=20sub-dir=20.bot/prompts//.md=20+=20ENGI?= =?UTF-8?q?NE=5FREF=205fbcee18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Engine #88 moved prompts to the convention layout .bot/prompts//.md and dropped author.user_prompt_template. Migrate this consumer in lockstep with the ENGINE_REF bump (45fd59f -> 5fbcee18, the #88 merge) so the engine finds its prompts: - git mv author_system.md -> engineer/system.md - git mv author_user.md -> engineer/user.md - git mv followup_system.md -> engineer-followup/system.md - git rm followup_user.md (dead — engine never rendered it; followup builds its user prompt from the PR thread) - .bot/config.yaml: drop author.user_prompt_template (the author user prompt is now the convention file engineer/user.md); comment paths updated. - .rat-excludes: .bot/prompts/*.md -> .bot/prompts/** so the sub-dir prompt files stay license-header-excluded (flat glob no longer matches the subdirs). No reviewer overrides here (review/ + review-followup/ omitted → engine defaults). Co-authored-by: Isaac --- .bot/config.yaml | 19 +++++++++---------- .../system.md} | 0 .../{author_system.md => engineer/system.md} | 0 .../{author_user.md => engineer/user.md} | 0 .bot/prompts/followup_user.md | 16 ---------------- .github/workflows/engineer-bot-followup.yml | 2 +- .github/workflows/engineer-bot.yaml | 2 +- .github/workflows/reviewer-bot-followup.yml | 2 +- .github/workflows/reviewer-bot.yml | 2 +- .rat-excludes | 2 +- 10 files changed, 14 insertions(+), 31 deletions(-) rename .bot/prompts/{followup_system.md => engineer-followup/system.md} (100%) rename .bot/prompts/{author_system.md => engineer/system.md} (100%) rename .bot/prompts/{author_user.md => engineer/user.md} (100%) delete mode 100644 .bot/prompts/followup_user.md diff --git a/.bot/config.yaml b/.bot/config.yaml index 09a4c748..d6381247 100644 --- a/.bot/config.yaml +++ b/.bot/config.yaml @@ -76,11 +76,11 @@ bash_allowlist: - [git, diff, --cached] - [git, status] -# Author phase: prompt rendered from the template; tokens are the ISSUE (the bug -# to fix). No driver PR, no SOURCE_PR_* — this is single-repo, issue-driven. +# Author phase: the user prompt is the convention template .bot/prompts/engineer/user.md +# (no config path — the engine discovers it); tokens are the ISSUE (the bug to fix). +# No driver PR, no SOURCE_PR_* — this is single-repo, issue-driven. author: - user_prompt_template: prompts/author_user.md - env_tokens: # {{issue_*}} in author_user.md <- env vars + env_tokens: # {{issue_*}} in engineer/user.md <- env vars issue_number: ISSUE_NUMBER issue_title: ISSUE_TITLE issue_body: ISSUE_BODY @@ -98,10 +98,9 @@ author: # Follow-up phase (engineer-bot-followup.yml): NO config block. The engine reads # no `followup:` key — bot_config.py parses only `author:` + the shared top-level -# keys. The follow-up phase uses .bot/prompts/followup_system.md as its system -# prompt, builds its user prompt from the PR review thread, and reuses -# author.knowledge_log — so a `followup:` block here would be dead config. -# (prompts/followup_user.md is likewise unrendered by the engine.) +# keys. The follow-up phase uses .bot/prompts/engineer-followup/system.md as its system +# prompt, builds its user prompt from the PR review thread (no user template), and +# reuses author.knowledge_log — so a `followup:` block here would be dead config. # The bug-fix flow (engine: flows/bug_fix.py): the engine appends the # "write a failing test → fix the CODE → re-run until green; don't weaken the @@ -114,8 +113,8 @@ flow: bug-fix # `author:` block + the shared top-level keys above. Reviewer prompts are # engine-owned; customize the reviewer via these (files/env — never config keys): # - prompt overrides — optional FILES read from the checkout: -# .bot/prompts/review_system.md (appended to the review prompt) -# .bot/prompts/review_followup_system.md (appended to the follow-up prompt) +# .bot/prompts/review/system.md (appended to the review prompt) +# .bot/prompts/review-followup/system.md (appended to the follow-up prompt) # - repo conventions — REPO_RULES_FILES env, set in reviewer-bot.yml / -followup.yml # - native skills — REPO_SKILLS env, set in those same workflows # Do NOT add a `review:` / `review_followup:` block here — the engine would ignore diff --git a/.bot/prompts/followup_system.md b/.bot/prompts/engineer-followup/system.md similarity index 100% rename from .bot/prompts/followup_system.md rename to .bot/prompts/engineer-followup/system.md diff --git a/.bot/prompts/author_system.md b/.bot/prompts/engineer/system.md similarity index 100% rename from .bot/prompts/author_system.md rename to .bot/prompts/engineer/system.md diff --git a/.bot/prompts/author_user.md b/.bot/prompts/engineer/user.md similarity index 100% rename from .bot/prompts/author_user.md rename to .bot/prompts/engineer/user.md diff --git a/.bot/prompts/followup_user.md b/.bot/prompts/followup_user.md deleted file mode 100644 index e5730d2f..00000000 --- a/.bot/prompts/followup_user.md +++ /dev/null @@ -1,16 +0,0 @@ -## Review comments to address - -You are following up on **PR #{{pr_number}}** (branch `{{head_branch}}`), the -fix PR you opened for the ADBC Databricks C# driver. - -A reviewer has left inline comments on this PR. The triggering comment id is -`{{trigger_comment_id}}` (empty when this run was woken by the `engineer-bot` -label rather than a single comment — in that case sweep **all** unaddressed -threads on the PR, not just one). - -Per the system prompt: read each open review thread, decide whether it asks for -a code change or only a clarification, make the minimal fix in `csharp/src/` -(or `csharp/test/`) where a change is warranted, keep the regression test -intact and the suite green, then reply on each thread describing what you did -(or why you pushed back). Read the existing `csharp/test/` conventions before -editing. diff --git a/.github/workflows/engineer-bot-followup.yml b/.github/workflows/engineer-bot-followup.yml index 81e7765f..baa3d55b 100644 --- a/.github/workflows/engineer-bot-followup.yml +++ b/.github/workflows/engineer-bot-followup.yml @@ -203,7 +203,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 + ENGINE_REF: 5fbcee18e479c58656a94e7704dabfe7edaf2b26 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/engineer-bot.yaml b/.github/workflows/engineer-bot.yaml index e242602d..bef81039 100644 --- a/.github/workflows/engineer-bot.yaml +++ b/.github/workflows/engineer-bot.yaml @@ -133,7 +133,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 + ENGINE_REF: 5fbcee18e479c58656a94e7704dabfe7edaf2b26 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot-followup.yml b/.github/workflows/reviewer-bot-followup.yml index 994a668c..54437a9d 100644 --- a/.github/workflows/reviewer-bot-followup.yml +++ b/.github/workflows/reviewer-bot-followup.yml @@ -176,7 +176,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 + ENGINE_REF: 5fbcee18e479c58656a94e7704dabfe7edaf2b26 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.github/workflows/reviewer-bot.yml b/.github/workflows/reviewer-bot.yml index e56817f4..6f0200d0 100644 --- a/.github/workflows/reviewer-bot.yml +++ b/.github/workflows/reviewer-bot.yml @@ -107,7 +107,7 @@ jobs: # repo cuts one). claude-agent-sdk / @anthropic-ai/claude-code are left # unpinned to match the hub (databricks-driver-test); pin them to exact # versions here if you want full reproducibility. - ENGINE_REF: 45fd59f15e7228f195409d64a3246e36605abad1 + ENGINE_REF: 5fbcee18e479c58656a94e7704dabfe7edaf2b26 run: | set -euo pipefail : "${ENGINE_REF:?pin the engine to a tag/SHA before activation (refusing @main)}" diff --git a/.rat-excludes b/.rat-excludes index 59c4c24b..38ceb423 100644 --- a/.rat-excludes +++ b/.rat-excludes @@ -43,7 +43,7 @@ rust/ci/proxy/htpasswd # would be prepended into the model's instructions. The workflows, .bot/config.yaml, # and .bot/SETUP.md all carry the standard Apache header instead; only the prompts # are excluded. -.bot/prompts/*.md +.bot/prompts/** # .claude/knowledge/** (repo conventions + the learning log) is read VERBATIM into # BOTH bots' prompt context (read_repo_conventions / aggregate_repo_rules) — same # rationale as the prompt files above: a license header would pollute the model's