diff --git a/.bot/config.yaml b/.bot/config.yaml index 6de59aac9..d63812475 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 @@ -96,23 +96,26 @@ 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/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 # 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. 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 e5730d2f3..000000000 --- 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 ded45be72..baa3d55b4 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: 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 6b9c87eee..bef810393 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: 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 6ce64862f..54437a9d1 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: 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 a5ada48f3..6f0200d02 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: 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 59c4c24b4..38ceb4239 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