|
1 | 1 | --- |
2 | 2 | name: apply-triage-action |
3 | | -description: Apply, reject, or defer exactly one recommendation from the most recent local triage queue report. Use when the on-duty engineer explicitly supplies one report-local ID such as R-01. For external actions, revalidate and preview the exact write, then require a second per-action confirmation before posting, labeling, creating, or closing anything. |
| 3 | +description: Apply, reject, or defer one stable item ID from a local triage queue report. Use when an engineer selects an issue or CI recommendation; preview and confirm each external write before performing it. |
| 4 | +metadata: |
| 5 | + internal: true |
4 | 6 | --- |
5 | 7 |
|
6 | 8 | # Apply Triage Action |
7 | 9 |
|
8 | | -Process exactly one report-local recommendation ID from the most recent dated queue-review report. Do not accept a natural-language approval without an ID. Do not accept an ID from an older report. |
| 10 | +Process exactly one stable item ID, such as `I2991` or a CI run's `C<hash>`, from a report created by `review-triage-queue`. `R-01` is display order only: ask for the stable ID instead. Natural-language approval without an ID does not select a recommendation. PR IDs are informational and have no supported action in v1. |
9 | 11 |
|
10 | 12 | ## Locate and validate |
11 | 13 |
|
12 | | -1. Find the most recent report in `architecture/plans/triage-duty-reports/`. |
13 | | -2. Read the selected recommendation and its current local disposition. |
14 | | -3. Reject missing, expired, already-final, or ambiguous IDs without making a write. |
15 | | -4. Append every explicit disposition to a dated local action report beside the queue reports. Record the source report, ID, timestamp, disposition, reason, and outcome. Keep sensitive content out of the record. |
| 14 | +1. Read `.agents/triage-duty/state.local.yml`, the relevant immutable report under `reports/`, and action records under `actions/`. Action records are authoritative; reconcile the checkpoint index from them before proceeding. |
| 15 | +2. Resolve the ID to its recorded repository and canonical source object, never to a row in the newest report. If the engineer names a report, use that snapshot; otherwise use the latest snapshot containing that ID and show its report filename, source, and action. If it differs materially from a prior recommendation the engineer may have read, require selection of the new action before previewing it. |
| 16 | +3. Stop for a missing, colliding, ambiguous, already-final, or superseded recommendation. An older report may select the same object, but a materially changed action requires a fresh review. Rejected items can return only with recorded material new evidence. Never substitute another item. |
| 17 | +4. Record every explicit disposition or attempted action in a dated append-only action record: repository, canonical source, stable ID, source report, timestamp, action, disposition, reason, confirmation, and outcome. Update the checkpoint index afterward; do not edit reports. Exclude secrets, private reasons, and vulnerability details. Private reasons stay with the engineer; record only `private reason withheld` locally. |
16 | 18 |
|
17 | 19 | ## Reject or defer |
18 | 20 |
|
19 | | -For **reject** or **defer**, require the engineer to give a reason. Record the no-write disposition. |
| 21 | +Require a reason for **reject** or **defer**. Reject is terminal locally until material new evidence; defer preserves original priority and carries into later reports independently of the new-intake budget. |
20 | 22 |
|
21 | | -- **Reject** is terminal locally. Do not recommend the item again unless material new evidence changes the case. |
22 | | -- **Defer** is non-terminal. Preserve its original priority and carry it into the next review's **Needs your decision** section. |
| 23 | +A shareable deferral (waiting on reporter evidence, a dependency, or linked PR changes) should survive a duty handoff on the GitHub issue. Draft a concise comment with the reason, relevant public links, and next step, then use the same per-write preview/confirmation gate below. Do not post automatically because the engineer requested deferral. If posting is declined, record that the deferral is local only. Private reasons remain local and must never enter an external payload or committable file. |
| 24 | + |
| 25 | +For missing reporter evidence, separately propose the current lifecycle label whose discovered description denotes awaiting information. Do not replace lifecycle labels for unrelated dependency waits. A comment and a label transition are separate writes and require separate confirmations; do not infer that one approves the other. Existing public waiting context can be linked instead of repeated. |
23 | 26 |
|
24 | 27 | ## Apply |
25 | 28 |
|
26 | | -Before any external write, re-read the target and determine whether it materially changed. |
| 29 | +Re-read the target and current labels/comments/checks before previewing a write. Follow [Label Discovery](../../../CONTRIBUTING.md#label-discovery), including all pages; use current definitions instead of a fixed label inventory. If a definition is unclear, resolve it before proposing a state change. Do not accept work, place it on the roadmap, or infer implementation authority from a label. |
27 | 30 |
|
28 | | -- If the action is already complete or would be a harmless no-op, make no external write and record the reason. |
29 | | -- If new information makes the action unsafe or substantially different, stop and request a fresh review/approval. |
30 | | -- Otherwise, show the exact single external write and require explicit second confirmation for that action. |
| 31 | +- If already complete or a harmless no-op, make no external write and record why. |
| 32 | +- If evidence or the target changed materially, stop for a fresh review and selection of the revised action. |
| 33 | +- Otherwise, show the stable ID, source report, canonical target, and exact **one** external write: full body/title, label diff, or closure reason as applicable. Require explicit confirmation of that payload. Selection of `apply <ID>` alone is not confirmation. |
31 | 34 |
|
32 | | -After confirmation, perform only the approved action and record the outcome. |
| 35 | +After confirmation, revalidate that the preview remains valid, perform only that write, and record its result and resulting public URL. If a material change occurred after preview, request a new preview/confirmation. If a write times out or its outcome is uncertain, inspect the target before retrying; do not duplicate a comment or issue. Keep failed/partial actions pending with the observed outcome; mark applied only once the selected action succeeds. Never reuse confirmation for a later invocation or changed payload. |
33 | 36 |
|
34 | | -Supported v1 actions: |
| 37 | +Supported v1 writes: |
35 | 38 |
|
36 | | -- Add `state:triage-needed` to an eligible community issue. |
37 | | -- Create one GitHub issue. |
38 | | -- Post one concise explanatory Slack reply, including a public-doc link when applicable. |
39 | | -- Mark an existing issue as a likely duplicate, including any approved comment or close action. |
| 39 | +- Add the discovered triage-queue label to an open substantive community issue with **no `state:*` label**, no intentional routing signal, and no duplicate, spam, or security-disclosure indication. Exclude maintainers/core contributors; uncertain eligibility stops the write. Recheck eligibility at application time. |
| 40 | +- Create one GitHub issue using `create-github-issue`, including its first-hand user-story requirements. Confirmation does not waive missing evidence. |
| 41 | +- Post one public issue comment, including shareable waiting context or a duplicate explanation. |
| 42 | +- Change an issue's assessment state to awaiting information, following the existing `triage-issue` conventions and replacing its prior assessment state as appropriate. |
| 43 | +- Close one issue, with the exact closure reason and evidence previewed separately. For duplicates, identify the canonical issue; approval to comment or label is not approval to close. |
40 | 44 |
|
41 | | -Never create a public GitHub issue for a security finding. Route it through the project's private security process instead. |
| 45 | +Never create a public issue for a suspected vulnerability. Follow [SECURITY.md](../../../SECURITY.md). This workflow supports GitHub only. |
0 commit comments