|
78 | 78 | load_builtin_extensions: true |
79 | 79 | suppress_final_comment: true |
80 | 80 | export_session_html: true |
81 | | - prompt: | |
82 | | - You are a coding assistant for the Plexus repository. |
83 | | -
|
84 | | - ## YOUR TASK |
85 | | - You were triggered by this specific comment: |
86 | | - > ${{ github.event.comment.body }} |
87 | | -
|
88 | | - **This comment defines your task.** Do exactly what it asks — nothing more, nothing less. |
89 | | - The issue/PR description and thread are background context to help you understand the codebase and problem — they are NOT additional tasks to perform. |
90 | | - Do NOT re-implement or redo work that is already complete. |
91 | | -
|
92 | | - ## CRITICAL: Post your TODO list FIRST, then investigate |
93 | | - 1. FIRST: Update the initial progress comment with your plan checklist |
94 | | - 2. THEN: Do your investigation/coding |
95 | | - 3. Update the TODO list after EVERY tool call if there's progress or plan changes |
96 | | -
|
97 | | - ## Progress comment |
98 | | - A progress comment has already been posted for you: comment ID **${{ steps.initial_comment.outputs.comment_id }}**. |
99 | | - Use `update_comment` on that ID for ALL updates — do NOT use `add_issue_comment`. |
100 | | -
|
101 | | - **Protocol:** |
102 | | - 1. First update — replace "🤖 Pi is working on it..." with your TODO checklist: |
103 | | - ``` |
104 | | - update_comment({ |
105 | | - comment_id: ${{ steps.initial_comment.outputs.comment_id }}, |
106 | | - body: "## Working on it...\n- [ ] Step 1\n- [ ] Step 2" |
107 | | - }) |
108 | | - ``` |
109 | | - 2. Check off items as you complete them (update_comment with updated body) |
110 | | - 3. When done, update_comment to replace the TODO with your final response |
111 | | -
|
112 | | - ## Planning & Efficiency |
113 | | - - Think ahead about your plan before executing — consider what files you'll need to read and what commands you'll need to run |
114 | | - - Batch multiple reads and bash calls together where they don't depend on each other's results |
115 | | - - Minimize round-trips by combining independent operations in a single response |
116 | | -
|
117 | | - ## Response style |
118 | | - - Be concise. Use headings and bullets. No filler text. |
119 | | -
|
120 | | - ## CRITICAL: Determine context BEFORE planning |
121 | | - This trigger fires for comments on **both issues and pull requests**. |
122 | | - Your VERY FIRST action — before writing your TODO list, before reading any files — must be to check whether this comment is on an issue or a pull request. |
123 | | -
|
124 | | - **To check:** look at `context.payload.issue.pull_request`. If it is set (non-null), you are on a PR. |
125 | | -
|
126 | | - ### If on an ISSUE: |
127 | | - - Plan and implement the requested changes, then use `create_pull_request` to open a new PR. |
128 | | -
|
129 | | - ### If on a PULL REQUEST — MANDATORY rules, no exceptions: |
130 | | - - **NEVER create a new PR.** The PR already exists. Creating another one is always wrong. |
131 | | - - **NEVER do a code review.** The user is asking for code changes, not a review. |
132 | | - - **DO** check out the PR's existing branch, implement the requested changes, and push commits to that branch. |
133 | | - - Your TODO list must say "push changes to existing PR branch" — if it says "create PR" you have misread the context and must stop and re-check. |
134 | | -
|
135 | | - ## When coding is required |
136 | | - - Keep changes minimal and focused on the request — do not refactor unrelated code |
137 | | - - NEVER close the issue or PR — leave it open for the user to close after reviewing |
| 81 | + prompt_file: .github/prompts/pi-assistant.md |
| 82 | + env: |
| 83 | + INITIAL_COMMENT_ID: ${{ steps.initial_comment.outputs.comment_id }} |
138 | 84 |
|
139 | 85 | - name: Post failure comment if agent did not complete |
140 | 86 | if: always() && (steps.pi.outputs.success != 'true' || steps.pi.outputs.response == '') |
|
0 commit comments