Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .github/workflows/amber-issue-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,17 @@ jobs:

## Instructions

1. Read the issue and understand the problem.
1. Read the issue body and all comments for full context (`gh issue view --comments`).
2. Explore the codebase to find the relevant code.
3. Create a plan for how to fix the issue. If there is any ambiguity —
unclear requirements, multiple valid approaches, missing context — you
MUST ask for clarification. IMPORTANT: Before calling AskUserQuestion,
ALWAYS send a Slack notification first (the session stops streaming when
AskUserQuestion is called, so the notification must go out before):
AskUserQuestion is called, so the notification must go out before).
Use Slack mrkdwn link format: <URL|display text>. Example:
```bash
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"I have a question about #${{ steps.issue.outputs.number }}\n*Issue*: https://github.com/${{ github.repository }}/issues/${{ steps.issue.outputs.number }}\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\n*Question*: <brief summary of what you need>"}' \
--data '{"text":"❓ *Question about <https://github.com/${{ github.repository }}/issues/${{ steps.issue.outputs.number }}|#${{ steps.issue.outputs.number }}${{ steps.issue.outputs.title }}>*\n<your question here>\n\n<'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>"}' \
"$SLACK_WEBHOOK_URL"
```
Only send if SLACK_WEBHOOK_URL is set. Then call AskUserQuestion.
Expand All @@ -101,10 +102,11 @@ jobs:
AGENTIC_SESSION_NAME environment variable):
<!-- acp:session_id=$AGENTIC_SESSION_NAME source=#${{ steps.issue.outputs.number }} last_action=<ISO8601_NOW> retry_count=0 -->
6. Add the `ambient-code:managed` label to the PR.
7. After creating the PR, send a Slack notification:
7. After creating the PR, send a Slack notification with a brief summary
of what you changed. Use Slack mrkdwn link format: <URL|display text>. Example:
```bash
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"PR created for #${{ steps.issue.outputs.number }}\n*PR*: <PR_URL>\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'"}' \
--data '{"text":"🔧 *PR created for <https://github.com/${{ github.repository }}/issues/${{ steps.issue.outputs.number }}|#${{ steps.issue.outputs.number }} — ${{ steps.issue.outputs.title }}>*\n<PR_URL|View PR> · <'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>\n\n<1-2 sentence summary of what you changed>"}' \
"$SLACK_WEBHOOK_URL"
```
Only send if SLACK_WEBHOOK_URL is set.
Expand Down Expand Up @@ -241,13 +243,14 @@ jobs:

## Slack Notifications

When you need human attention — whether you hit the circuit breaker (3 retries),
you're stuck and can't proceed, or you use the AskUserQuestion tool — send a
Slack notification:
When you need human attention — circuit breaker, stuck, or before calling
AskUserQuestion — send a Slack notification. IMPORTANT: Always send BEFORE
calling AskUserQuestion (the session stops streaming on that call).
Use Slack mrkdwn link format: <URL|display text>. Example:

```bash
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"I need human attention\n*PR*: ${{ steps.context.outputs.url }}\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\n*Reason*: <brief reason>"}' \
--data '{"text":"🚨 *Need help with <${{ steps.context.outputs.url }}|PR #${{ steps.context.outputs.number }}>*\n<reason — what you tried and why you're stuck>\n\n<'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>"}' \
"$SLACK_WEBHOOK_URL"
```

Expand Down Expand Up @@ -275,16 +278,17 @@ jobs:

## Instructions

1. Read the issue and understand the problem.
1. Read the issue body and all comments for full context (`gh issue view --comments`).
2. Explore the codebase to find the relevant code.
3. Create a plan for how to fix the issue. If there is any ambiguity —
unclear requirements, multiple valid approaches, missing context — you
MUST ask for clarification. IMPORTANT: Before calling AskUserQuestion,
ALWAYS send a Slack notification first (the session stops streaming when
AskUserQuestion is called, so the notification must go out before):
AskUserQuestion is called, so the notification must go out before).
Use Slack mrkdwn link format: <URL|display text>. Example:
```bash
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"I have a question about #${{ steps.context.outputs.number }}\n*Issue*: ${{ steps.context.outputs.url }}\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\n*Question*: <brief summary of what you need>"}' \
--data '{"text":"❓ *Question about <${{ steps.context.outputs.url }}|#${{ steps.context.outputs.number }}>*\n<your question here>\n\n<'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>"}' \
"$SLACK_WEBHOOK_URL"
```
Only send if SLACK_WEBHOOK_URL is set. Then call AskUserQuestion.
Expand All @@ -294,10 +298,11 @@ jobs:
AGENTIC_SESSION_NAME environment variable):
<!-- acp:session_id=$AGENTIC_SESSION_NAME source=#${{ steps.context.outputs.number }} last_action=<ISO8601_NOW> retry_count=0 -->
6. Add the `ambient-code:managed` label to the PR.
7. After creating the PR, send a Slack notification:
7. After creating the PR, send a Slack notification with a brief summary
of what you changed. Use Slack mrkdwn link format: <URL|display text>. Example:
```bash
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"PR created for #${{ steps.context.outputs.number }}\n*PR*: <PR_URL>\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'"}' \
--data '{"text":"🔧 *PR created for <${{ steps.context.outputs.url }}|#${{ steps.context.outputs.number }}>*\n<PR_URL|View PR> · <'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>\n\n<1-2 sentence summary of what you changed>"}' \
"$SLACK_WEBHOOK_URL"
```
Only send if SLACK_WEBHOOK_URL is set.
Expand Down Expand Up @@ -611,10 +616,12 @@ jobs:

## Slack Notifications

When you need human attention — circuit breaker, stuck, or using AskUserQuestion — send:
When you need human attention — circuit breaker, stuck, or before calling
AskUserQuestion — send a Slack notification. IMPORTANT: Always send BEFORE
calling AskUserQuestion. Use Slack mrkdwn link format: <URL|display text>.

curl -X POST -H 'Content-type: application/json' \\
--data '{{"text":"I need human attention\\n*PR*: https://github.com/{REPO}/pull/{number}\\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\\n*Reason*: <brief reason>"}}' \\
--data '{{"text":"🚨 *Need help with <https://github.com/{REPO}/pull/{number}|PR #{number}>*\\n<reason — what you tried and why you are stuck>\\n\\n<'"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'|View Session>"}}' \\
"$SLACK_WEBHOOK_URL"

Only send if SLACK_WEBHOOK_URL is set."""
Expand Down
Loading