@gumpwang/agent-workflow 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ # triage — a new ticket, one without a state yet, is checked by an agent
2
+ # against the repository and other tickets (prompts/triage.md holds the method).
3
+ # The agent labels it, assigns it and comments the result;
4
+ # the engine then moves it into the workflow by the verdict:
5
+ # ready Todo; implement starts once no open ticket blocks it
6
+ # backlog Backlog: a spec, or work that waits on something other than a ticket
7
+ # needs-info Needs Info, with the open questions in the comment; once they are
8
+ # answered, take the state off again (GitHub: remove the label;
9
+ # Linear: move it back to Triage) and it is triaged again
10
+ # close closed as not planned: a duplicate, invalid, or will not be done
11
+ # It runs whoever the ticket is assigned to (on.any_assignee). On GitHub an open
12
+ # issue without a state label is in Open; Linear projects trigger it on their
13
+ # Triage state with `states: { triage: [Triage] }` in project.yaml.
14
+ # Paths are relative to the rule set root.
15
+ name: triage
16
+ description: Check a new ticket, label and assign it, and move it into the workflow
17
+ on:
18
+ states: [Open]
19
+ any_assignee: true
20
+ inputs:
21
+ assignee: { type: string, default: me, description: Who a ticket that stays open is assigned to }
22
+ roles:
23
+ triager:
24
+ max_attempts: 2
25
+ steps:
26
+ - id: triage
27
+ launch: triager
28
+ prompt_file: prompts/triage.md
29
+ resume_prompt_file: prompts/triage-resume.md
30
+ expect:
31
+ delivery: triage
32
+ sections: ["## Verdict", "## Labels", "## Reasons"]
33
+ verdicts: [ready, backlog, needs-info, close]
34
+ - if: steps.triage.outcome == 'ready'
35
+ tracker: { state: Todo }
36
+ - if: steps.triage.outcome == 'backlog'
37
+ tracker: { state: Backlog }
38
+ - if: steps.triage.outcome == 'needs-info'
39
+ tracker: { state: Needs Info }
40
+ - if: steps.triage.outcome == 'close'
41
+ tracker:
42
+ # GitHub has no Canceled state: a dropped ticket's issue is closed.
43
+ state: "${{ project.tracker == 'github' && 'Closed' || 'Canceled' }}"
44
+ reason: not_planned