diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml index bf4a2656c7..0337713cc1 100644 --- a/.github/workflows/delight.lock.yml +++ b/.github/workflows/delight.lock.yml @@ -189,10 +189,50 @@ jobs: mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > /opt/gh-aw/safeoutputs/config.json << 'EOF' - {"create_discussion":{"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1}} + {"create_discussion":{"max":1},"create_issue":{"max":3},"missing_data":{},"missing_tool":{},"noop":{"max":1}} EOF cat > /opt/gh-aw/safeoutputs/tools.json << 'EOF' [ + { + "description": "Create a new GitHub issue for tracking bugs, feature requests, or tasks. Use this for actionable work items that need assignment, labeling, and status tracking. For reports, announcements, or status updates that don't require task tracking, use create_discussion instead. CONSTRAINTS: Maximum 3 issue(s) can be created. Labels [delight] will be automatically added.", + "inputSchema": { + "additionalProperties": false, + "properties": { + "body": { + "description": "Detailed issue description in Markdown. Do NOT repeat the title as a heading since it already appears as the issue's h1. Include context, reproduction steps, or acceptance criteria as appropriate.", + "type": "string" + }, + "labels": { + "description": "Labels to categorize the issue (e.g., 'bug', 'enhancement'). Labels must exist in the repository.", + "items": { + "type": "string" + }, + "type": "array" + }, + "parent": { + "description": "Parent issue number for creating sub-issues. This is the numeric ID from the GitHub URL (e.g., 42 in github.com/owner/repo/issues/42). Can also be a temporary_id (e.g., 'aw_abc123def456') from a previously created issue in the same workflow run.", + "type": [ + "number", + "string" + ] + }, + "temporary_id": { + "description": "Unique temporary identifier for referencing this issue before it's created. Format: 'aw_' followed by 12 hex characters (e.g., 'aw_abc123def456'). Use '#aw_ID' in body text to reference other issues by their temporary_id; these are replaced with actual issue numbers after creation.", + "type": "string" + }, + "title": { + "description": "Concise issue title summarizing the bug, feature, or task. The title appears as the main heading, so keep it brief and descriptive.", + "type": "string" + } + }, + "required": [ + "title", + "body" + ], + "type": "object" + }, + "name": "create_issue" + }, { "description": "Create a GitHub discussion for announcements, Q\u0026A, reports, status updates, or community conversations. Use this for content that benefits from threaded replies, doesn't require task tracking, or serves as documentation. For actionable work items that need assignment and status tracking, use create_issue instead. CONSTRAINTS: Maximum 1 discussion(s) can be created. Discussions will be created in category \"audits\".", "inputSchema": { @@ -318,6 +358,39 @@ jobs: } } }, + "create_issue": { + "defaultMax": 1, + "fields": { + "body": { + "required": true, + "type": "string", + "sanitize": true, + "maxLength": 65000 + }, + "labels": { + "type": "array", + "itemType": "string", + "itemSanitize": true, + "itemMaxLength": 128 + }, + "parent": { + "issueOrPRNumber": true + }, + "repo": { + "type": "string", + "maxLength": 256 + }, + "temporary_id": { + "type": "string" + }, + "title": { + "required": true, + "type": "string", + "sanitize": true, + "maxLength": 128 + } + } + }, "missing_tool": { "defaultMax": 20, "fields": { @@ -938,7 +1011,7 @@ jobs: [Repeat the same structure] ``` - **Important**: Include these tasks directly in the discussion body - do NOT create separate GitHub issues. + **Important**: You can include these tasks directly in the discussion body OR create separate GitHub issues with the `create-issue` safe output. When creating issues, they will automatically have the "delight" label applied. ### Step 7: Update Memory @@ -1005,7 +1078,6 @@ jobs: - **Maximum 3 tasks** per run to avoid overwhelming - **Actionable and scoped** - each task should be completable in 1-2 days - **Evidence-based** - include specific examples from audit - - **User-focused** - frame in terms of user experience impact PROMPT_EOF - name: Substitute placeholders uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 @@ -1032,7 +1104,8 @@ jobs: GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} run: | cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - - **Include in discussion** - tasks are rendered as markdown in the discussion body, not as separate issues + - **User-focused** - frame in terms of user experience impact + - **Flexible output** - tasks can be included in the discussion body or created as separate issues with the "delight" label ### Quality Standards - All recommendations backed by AirBnB design principles @@ -1149,7 +1222,7 @@ jobs: To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls. - **Available tools**: create_discussion, missing_tool, noop + **Available tools**: create_discussion, create_issue, missing_tool, noop **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped. @@ -1720,6 +1793,7 @@ jobs: permissions: contents: read discussions: write + issues: write timeout-minutes: 15 env: GH_AW_ENGINE_ID: "copilot" @@ -1757,7 +1831,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_discussion\":{\"category\":\"audits\",\"close_older_discussions\":true,\"expires\":168,\"max\":1},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_discussion\":{\"category\":\"audits\",\"close_older_discussions\":true,\"expires\":168,\"max\":1},\"create_issue\":{\"labels\":[\"delight\"],\"max\":3},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/delight.md b/.github/workflows/delight.md index 2450ad0af8..67cd6b54b9 100644 --- a/.github/workflows/delight.md +++ b/.github/workflows/delight.md @@ -26,6 +26,9 @@ safe-outputs: category: "audits" max: 1 close-older-discussions: true + create-issue: + labels: [delight] + max: 3 messages: footer: "> ✨ *Delight analysis by [{workflow_name}]({run_url})*" run-started: "✨ Delight Agent starting! [{workflow_name}]({run_url}) is scanning for user experience opportunities..." @@ -419,7 +422,7 @@ Here are 1-3 actionable improvement tasks that can be addressed by agents: [Repeat the same structure] ``` -**Important**: Include these tasks directly in the discussion body - do NOT create separate GitHub issues. +**Important**: You can include these tasks directly in the discussion body OR create separate GitHub issues with the `create-issue` safe output. When creating issues, they will automatically have the "delight" label applied. ### Step 7: Update Memory @@ -487,7 +490,7 @@ EOF - **Actionable and scoped** - each task should be completable in 1-2 days - **Evidence-based** - include specific examples from audit - **User-focused** - frame in terms of user experience impact -- **Include in discussion** - tasks are rendered as markdown in the discussion body, not as separate issues +- **Flexible output** - tasks can be included in the discussion body or created as separate issues with the "delight" label ### Quality Standards - All recommendations backed by AirBnB design principles