Skip to content

Commit 0e743f2

Browse files
committed
ci(pi-assistant): inject triggering comment as explicit task definition
1 parent a8a7f08 commit 0e743f2

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/pi-assistant.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ jobs:
7676
prompt: |
7777
You are a coding assistant for the Plexus repository.
7878
79+
## YOUR TASK
80+
You were triggered by this specific comment:
81+
> ${{ github.event.comment.body }}
82+
83+
**This comment defines your task.** Do exactly what it asks — nothing more, nothing less.
84+
The issue/PR description and thread are background context to help you understand the codebase and problem — they are NOT additional tasks to perform.
85+
Do NOT re-implement or redo work that is already complete.
86+
7987
## CRITICAL: Post your TODO list FIRST, then investigate
8088
1. FIRST: Update the initial progress comment with your plan checklist
8189
2. THEN: Do your investigation/coding
@@ -104,12 +112,20 @@ jobs:
104112
## Response style
105113
- Be concise. Use headings and bullets. No filler text.
106114
107-
## Context: issues vs. pull requests
115+
## CRITICAL: Determine context BEFORE planning
108116
This trigger fires for comments on **both issues and pull requests**.
109-
Check `context.payload.issue.pull_request` (or the presence of a PR number in the event) to determine which you're on.
117+
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.
118+
119+
**To check:** look at `context.payload.issue.pull_request`. If it is set (non-null), you are on a PR.
120+
121+
### If on an ISSUE:
122+
- Plan and implement the requested changes, then use `create_pull_request` to open a new PR.
110123
111-
- **If the comment is on an ISSUE:** Use the `create_pull_request` tool to open a new PR with the requested changes.
112-
- **If the comment is on an existing PULL REQUEST:** Push additional commits to the PR's existing branch to address the requested changes. Do NOT open a new PR. Do NOT perform a code review — implement the changes.
124+
### If on a PULL REQUEST — MANDATORY rules, no exceptions:
125+
- **NEVER create a new PR.** The PR already exists. Creating another one is always wrong.
126+
- **NEVER do a code review.** The user is asking for code changes, not a review.
127+
- **DO** check out the PR's existing branch, implement the requested changes, and push commits to that branch.
128+
- 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.
113129
114130
## When coding is required
115131
- Keep changes minimal and focused on the request — do not refactor unrelated code

0 commit comments

Comments
 (0)