22#
33# A maintainer labels an ISSUE with `engineer-bot`; the bot addresses it and opens
44# a PR. The author FLOW is chosen from the issue's TYPE (a GitHub org-level Issue
5- # Type): `Bug` ⇒ bug-fix (reproduce with a failing test, then fix); `Task`/`Feature`
6- # ⇒ task (smallest correct change); any other type / none ⇒ the repo's
7- # .bot/config.yaml `flow:` default. Set the Type BEFORE `engineer-bot` — it's read
8- # live when the run starts. Driven by the selected flow + this repo's .bot/
9- # (config + prompts).
5+ # Type): `Bug` ⇒ bug-fix (reproduce with a failing test, then fix); any other type
6+ # / none ⇒ the repo's .bot/config.yaml `flow:` default (also bug-fix). Only bug-fix
7+ # is selectable because this repo's .bot/prompts/engineer/ prompts are written
8+ # exclusively for it; a task-flavored flow would need matching prompts first. Set
9+ # the Type BEFORE `engineer-bot` — it's read live when the run starts. Driven by
10+ # the selected flow + this repo's .bot/ (config + prompts).
1011#
1112# The engineer builds and runs THIS repo's tests, so it needs the connector's
1213# deps installed (via setup-poetry) in addition to the engine. Shared setup
@@ -135,14 +136,17 @@ jobs:
135136 # The type→flow MAPPING is pinned (not "use the type name as the flow")
136137 # so an arbitrary custom org type can never select an engine flow:
137138 # Bug ⇒ bug-fix (red→green TDD)
138- # Task/Feature ⇒ task (single-pass, smallest correct change; the engine
139- # has no separate `enhancement` flow — it was renamed to `task`)
139+ # Only `bug-fix` is mapped: this repo's .bot/prompts/engineer/{system,user}.md
140+ # are written EXCLUSIVELY for the bug-fix flow ("reproduce the bug with a
141+ # failing test, then fix"). Mapping Task/Feature ⇒ task would run the
142+ # engine's single-pass `task` flow under a prompt that mandates red→green
143+ # bug reproduction — a flow/prompt contradiction. Until flow-aware prompts
144+ # exist, every run uses bug-fix.
140145 # Any other type or no type ⇒ emit nothing ⇒ the author step omits
141- # --flow ⇒ the engine uses .bot/config.yaml `flow:`.
146+ # --flow ⇒ the engine uses .bot/config.yaml `flow:` default (bug-fix) .
142147 TYPE="$(jq -r '.type.name // ""' "$RUNNER_TEMP/issue.json")"
143148 case "$TYPE" in
144- Bug) echo "flow=bug-fix" >> "$GITHUB_OUTPUT" ;;
145- Task|Feature) echo "flow=task" >> "$GITHUB_OUTPUT" ;;
149+ Bug) echo "flow=bug-fix" >> "$GITHUB_OUTPUT" ;;
146150 esac
147151 DELIM="GHEOF_$(date +%s%N)${RANDOM}"
148152 if printf '%s' "$TITLE" | grep -qF "$DELIM"; then
@@ -160,8 +164,8 @@ jobs:
160164 # $GITHUB_ENV (the bot config's author.env_tokens).
161165 #
162166 # The author FLOW is chosen from the issue TYPE by the ctx step above
163- # (Bug ⇒ bug-fix, Task/Feature ⇒ task ). We pass --flow ONLY when that
164- # step derived one: an empty --flow would be rejected by the CLI's
167+ # (Bug ⇒ bug-fix; any other/none ⇒ config default ). We pass --flow ONLY
168+ # when that step derived one: an empty --flow would be rejected by the CLI's
165169 # `choices`, and omitting it lets the engine fall back to the
166170 # .bot/config.yaml `flow:` default (no/other type, or type-set-late case).
167171 working-directory : ${{ runner.temp }}
0 commit comments