@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.
- package/README.md +24 -13
- package/dist/agent-workflow.js +750 -218
- package/docs/contract.md +127 -88
- package/package.json +1 -1
- package/templates/agents.yaml +17 -0
- package/templates/config.yaml +11 -99
- package/templates/handlers/agent-merge.sh +1 -1
- package/templates/handlers/workspace-cleanup.sh +6 -0
- package/templates/handlers/workspace-provision.sh +14 -0
- package/templates/projects/your-repo/project.yaml +83 -0
- package/templates/prompts/fix.md +4 -4
- package/templates/prompts/implement.md +11 -171
- package/templates/prompts/rereview.md +2 -2
- package/templates/prompts/resume.md +1 -1
- package/templates/prompts/review-resume.md +1 -1
- package/templates/prompts/review.md +8 -23
- package/templates/prompts/triage-resume.md +1 -0
- package/templates/prompts/triage.md +66 -0
- package/templates/workflows/implement.yaml +11 -3
- package/templates/workflows/merge.yaml +6 -1
- package/templates/workflows/review-loop.yaml +58 -41
- package/templates/workflows/teardown.yaml +1 -1
- package/templates/workflows/triage.yaml +44 -0
|
@@ -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
|