Skip to content

Commit b2cb7b1

Browse files
Claude (Initial Force WPF Bot)claude
andcommitted
fix(workflows): apply prompt-input pattern to remaining 5 workflows
After validating in pr-review.yml that the action's 'prompt:' input (rather than --prompt-file in claude_args) is what triggers the agent to actually run, propagate the same pattern to the other Claude-using workflows: - claude-on-failure.yml: failure-analysis.md - pr-discovery.yml: pr-discovery.md - pr-ingestion.yml: cherry-pick.md + cherry-pick-conflict-resolution.md - release.yml: release-notes.md - nightly-rebase.yml: resolve-rebase-conflict.md (direct CLI call — the Claude CLI doesn't accept --prompt-file, so use 'claude -p \"\$(cat <file>)\"' instead) Each Claude action call is now preceded by a 'Load <name> prompt' step that reads the .md prompt file into a step output, which feeds the action's prompt: input. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 75c346e commit b2cb7b1

5 files changed

Lines changed: 65 additions & 8 deletions

File tree

.github/workflows/claude-on-failure.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,24 @@ jobs:
9292
env:
9393
GH_TOKEN: ${{ steps.app-token.outputs.token }}
9494

95+
- name: Load failure-analysis prompt
96+
id: load-prompt
97+
shell: bash
98+
run: |
99+
{
100+
echo 'prompt<<__EOF_PROMPT__'
101+
cat .if-fork/prompts/failure-analysis.md
102+
echo
103+
echo '__EOF_PROMPT__'
104+
} >> "$GITHUB_OUTPUT"
105+
95106
- name: Run failure analysis (Claude Sonnet)
96107
id: run-analysis
97108
uses: anthropics/claude-code-action@v1
98109
with:
99110
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
111+
prompt: ${{ steps.load-prompt.outputs.prompt }}
100112
claude_args: >-
101-
--prompt-file .if-fork/prompts/failure-analysis.md
102113
--max-turns 8
103114
--model claude-sonnet-4-6
104115
--allowedTools Read,Bash,Grep,mcp__github__issue_write,mcp__github__search_issues

.github/workflows/nightly-rebase.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,14 @@ jobs:
140140
break
141141
fi
142142
143-
# Use Claude to resolve conflicts
143+
# Use Claude to resolve conflicts. The Claude CLI does not
144+
# support --prompt-file directly; pass the prompt via -p.
145+
PROMPT_TEXT="$(cat .if-fork/prompts/resolve-rebase-conflict.md)"
144146
CONFLICT_FILES="$CONFLICT_FILES" \
145147
CURRENT_BRANCH="$BRANCH" \
146148
ESCALATION_ISSUE_PATH="/tmp/rebase-escalation.md" \
147149
CONFIG_PATH=".if-fork/config.yaml" \
148-
claude --prompt-file .if-fork/prompts/resolve-rebase-conflict.md \
150+
claude -p "$PROMPT_TEXT" \
149151
--max-turns 20 \
150152
--model claude-sonnet-4-6 \
151153
--allowedTools "Bash,Read,Edit,Grep" \

.github/workflows/pr-discovery.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,24 @@ jobs:
5454
# NOTE: The actual Claude action wiring (anthropics/claude-code-action) is implemented
5555
# in a separate bead. This step is a placeholder that calls the action in the same form
5656
# as the rest of the pipeline; CI will skip/fail gracefully until the action is wired.
57+
- name: Load pr-discovery prompt
58+
id: load-prompt
59+
shell: bash
60+
run: |
61+
{
62+
echo 'prompt<<__EOF_PROMPT__'
63+
cat .if-fork/prompts/pr-discovery.md
64+
echo
65+
echo '__EOF_PROMPT__'
66+
} >> "$GITHUB_OUTPUT"
67+
5768
- name: Run discovery (Claude Haiku)
5869
id: run
59-
# placeholder — replace with real action once claude-code-action bead lands
6070
uses: anthropics/claude-code-action@v1
6171
with:
6272
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
73+
prompt: ${{ steps.load-prompt.outputs.prompt }}
6374
claude_args: >-
64-
--prompt-file .if-fork/prompts/pr-discovery.md
6575
--max-turns 8
6676
--model claude-haiku-4-5
6777
--allowedTools Bash,Read,Grep,mcp__github__list_pull_requests,mcp__github__search_pull_requests,mcp__github__issue_write

.github/workflows/pr-ingestion.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,24 @@ jobs:
266266
git checkout -b "${{ steps.set-branch.outputs.branch }}" if/staging || \
267267
git checkout "${{ steps.set-branch.outputs.branch }}"
268268
269+
- name: Load cherry-pick prompt
270+
id: load-prompt-pick
271+
shell: bash
272+
run: |
273+
{
274+
echo 'prompt<<__EOF_PROMPT__'
275+
cat .if-fork/prompts/cherry-pick.md
276+
echo
277+
echo '__EOF_PROMPT__'
278+
} >> "$GITHUB_OUTPUT"
279+
269280
- name: Run cherry-pick (Claude Sonnet)
270281
id: pick
271282
uses: anthropics/claude-code-action@v1
272283
with:
273284
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
285+
prompt: ${{ steps.load-prompt-pick.outputs.prompt }}
274286
claude_args: >-
275-
--prompt-file .if-fork/prompts/cherry-pick.md
276287
--max-turns 15
277288
--model claude-sonnet-4-6
278289
--allowedTools Bash,Read,Edit,Grep,mcp__github__pull_request_read,mcp__github__get_file_contents,mcp__github__issue_write
@@ -283,13 +294,25 @@ jobs:
283294
PINNED_HEAD_SHA: ${{ env.PINNED_HEAD_SHA }}
284295
CHERRY_PICK_BRANCH: ${{ steps.set-branch.outputs.branch }}
285296

297+
- name: Load cherry-pick-conflict-resolution prompt
298+
id: load-prompt-conflict
299+
if: steps.pick.outcome == 'failure'
300+
shell: bash
301+
run: |
302+
{
303+
echo 'prompt<<__EOF_PROMPT__'
304+
cat .if-fork/prompts/cherry-pick-conflict-resolution.md
305+
echo
306+
echo '__EOF_PROMPT__'
307+
} >> "$GITHUB_OUTPUT"
308+
286309
- name: Run conflict-resolution if cherry-pick failed
287310
if: steps.pick.outcome == 'failure'
288311
uses: anthropics/claude-code-action@v1
289312
with:
290313
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
314+
prompt: ${{ steps.load-prompt-conflict.outputs.prompt }}
291315
claude_args: >-
292-
--prompt-file .if-fork/prompts/cherry-pick-conflict-resolution.md
293316
--max-turns 10
294317
--model claude-sonnet-4-6
295318
--allowedTools Bash,Read,Edit,Grep,mcp__github__issue_write

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,23 @@ jobs:
303303
echo "Previous tag: $PREV_TAG"
304304
shell: bash
305305

306+
- name: Load release-notes prompt
307+
id: load-prompt
308+
shell: bash
309+
run: |
310+
{
311+
echo 'prompt<<__EOF_PROMPT__'
312+
cat .if-fork/prompts/release-notes.md
313+
echo
314+
echo '__EOF_PROMPT__'
315+
} >> "$GITHUB_OUTPUT"
316+
306317
- name: Run release notes prompt (Claude Sonnet)
307318
uses: anthropics/claude-code-action@v1
308319
with:
309320
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
321+
prompt: ${{ steps.load-prompt.outputs.prompt }}
310322
claude_args: >-
311-
--prompt-file .if-fork/prompts/release-notes.md
312323
--max-turns 10
313324
--model claude-sonnet-4-6
314325
--allowedTools Bash,Read,Grep

0 commit comments

Comments
 (0)