@nanobpm/nano-workforce 0.26.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/.github/workflows/ci.yml +60 -0
- package/.github/workflows/release.yml +58 -0
- package/.releaserc.json +17 -0
- package/AGENTS.md +168 -0
- package/CHANGELOG.md +231 -0
- package/LICENSE +202 -0
- package/README.md +303 -0
- package/SPEC.md +492 -0
- package/actions/abandon.test.ts +93 -0
- package/actions/abandon.ts +23 -0
- package/actions/blackboard.test.ts +195 -0
- package/actions/blackboard.ts +76 -0
- package/actions/cancel.ts +29 -0
- package/actions/feature-answer-hook.ts +44 -0
- package/actions/message.ts +49 -0
- package/actions/plan-hook.ts +19 -0
- package/actions/plan-start.ts +17 -0
- package/actions/start.ts +19 -0
- package/actions/status.ts +22 -0
- package/actions/webhook-submit.ts +21 -0
- package/app/abandon.test.ts +97 -0
- package/app/abandon.ts +105 -0
- package/app/baseGuard.test.ts +35 -0
- package/app/baseGuard.ts +62 -0
- package/app/blackboard.test.ts +295 -0
- package/app/blackboard.ts +301 -0
- package/app/github.test.ts +59 -0
- package/app/github.ts +647 -0
- package/app/mergeExclusion.test.ts +168 -0
- package/app/mergeExclusion.ts +211 -0
- package/app/mergeProtocol.test.ts +124 -0
- package/app/mergeProtocol.ts +193 -0
- package/app/mergeRebaseArm.test.ts +72 -0
- package/app/mergeTrain.test.ts +91 -0
- package/app/mergeTrain.ts +117 -0
- package/app/persist-escalation.test.ts +119 -0
- package/app/persist-round.test.ts +65 -0
- package/app/plan.test.ts +317 -0
- package/app/plan.ts +321 -0
- package/app/record-plan-review.test.ts +38 -0
- package/app/reviewWait.test.ts +70 -0
- package/app/reviewWait.ts +59 -0
- package/app/rounds.test.ts +74 -0
- package/app/rounds.ts +48 -0
- package/app/service.test.ts +101 -0
- package/app/service.ts +895 -0
- package/app/taskDelta.test.ts +144 -0
- package/app/taskDelta.ts +175 -0
- package/app/trialMerge.test.ts +15 -0
- package/app/trialMerge.ts +102 -0
- package/app/waves.test.ts +128 -0
- package/app/waves.ts +116 -0
- package/assets/icon.svg +13 -0
- package/components/review-round.json +69 -0
- package/db/migrations/001_init.sql +46 -0
- package/db/migrations/002_transcript.sql +7 -0
- package/db/migrations/003_open_escalation.sql +8 -0
- package/db/migrations/004_merge.sql +36 -0
- package/db/migrations/004_planning.sql +37 -0
- package/db/migrations/005_job_activation.sql +15 -0
- package/db/migrations/005_plan_deps.sql +20 -0
- package/db/migrations/006_plan_review.sql +22 -0
- package/db/migrations/006_task_escalation.sql +52 -0
- package/db/migrations/007_plan_review_job_key.sql +14 -0
- package/db/migrations/007_wave_gate.sql +16 -0
- package/db/migrations/008_review_nudge.sql +9 -0
- package/db/migrations/009_plan_blackboard.sql +46 -0
- package/db/migrations/010_plan_task_deltas.sql +27 -0
- package/db/migrations/011_plan_merge_exclusions.sql +26 -0
- package/db/migrations/012_merge_protocol_attempt.sql +4 -0
- package/db/migrations/013_merge_train_waiting_lane.sql +6 -0
- package/db/migrations/014_plan_trial_merges.sql +21 -0
- package/db/migrations/015_pr_abandon_token.sql +9 -0
- package/deno.json +24 -0
- package/deno.lock +1776 -0
- package/main.ts +71 -0
- package/nano-ide.ext.json +7 -0
- package/nano.app.json +138 -0
- package/nanobpm.project.json +20 -0
- package/package.json +56 -0
- package/pages/epic.page.json +195 -0
- package/pages/home.page.json +296 -0
- package/prompts/feature.md +132 -0
- package/prompts/fix-ci.md +65 -0
- package/prompts/plan-review.md +69 -0
- package/prompts/plan.md +183 -0
- package/prompts/rebase.md +82 -0
- package/prompts/review-round.md +171 -0
- package/prompts/trial-merge.md +43 -0
- package/renovate.json +21 -0
- package/resources/processes/convergence-loop.bpmn +399 -0
- package/resources/processes/merge-loop.bpmn +585 -0
- package/resources/processes/plan-fanout.bpmn +546 -0
- package/scripts/check-agent-prompts.test.ts +84 -0
- package/scripts/check-agent-prompts.ts +143 -0
- package/scripts/layout-bpmn.ts +99 -0
- package/scripts/purge-db.ts +57 -0
- package/scripts/upgrade-from-pack.ts +334 -0
- package/tsconfig.json +51 -0
- package/workers/arm-merge/worker.ts +18 -0
- package/workers/finalize/worker.ts +89 -0
- package/workers/mark-merged/worker.ts +21 -0
- package/workers/merge/worker.ts +119 -0
- package/workers/persist-escalation/worker.ts +107 -0
- package/workers/persist-round/worker.ts +52 -0
- package/workers/persist-task-escalation/worker.ts +112 -0
- package/workers/record-plan/worker.ts +135 -0
- package/workers/record-plan-review/worker.ts +92 -0
- package/workers/record-results/worker.ts +30 -0
- package/workers/record-trial-merge/worker.test.ts +104 -0
- package/workers/record-trial-merge/worker.ts +88 -0
- package/workers/record-wave/worker.test.ts +221 -0
- package/workers/record-wave/worker.ts +308 -0
- package/workers/select-wave/worker.test.ts +130 -0
- package/workers/select-wave/worker.ts +84 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" id="Definitions_nano_workforce_plan" targetNamespace="http://nanobpm.io/nano-workforce">
|
|
3
|
+
<bpmn:message id="Message_featureEscalationAnswered" name="feature-escalation-answered">
|
|
4
|
+
<bpmn:extensionElements>
|
|
5
|
+
<zeebe:subscription correlationKey="=planKey + ":" + task.id" />
|
|
6
|
+
</bpmn:extensionElements>
|
|
7
|
+
</bpmn:message>
|
|
8
|
+
<bpmn:message id="Message_waveMerged" name="wave-merged">
|
|
9
|
+
<bpmn:extensionElements>
|
|
10
|
+
<zeebe:subscription correlationKey="=planKey" />
|
|
11
|
+
</bpmn:extensionElements>
|
|
12
|
+
</bpmn:message>
|
|
13
|
+
<bpmn:process id="plan-fanout" name="Agent Fleet — plan & implement" isExecutable="true">
|
|
14
|
+
<bpmn:startEvent id="Start" name="Issue submitted">
|
|
15
|
+
<bpmn:outgoing>f_toPlan</bpmn:outgoing>
|
|
16
|
+
</bpmn:startEvent>
|
|
17
|
+
<bpmn:serviceTask id="plan" name="Plan (agent)">
|
|
18
|
+
<bpmn:extensionElements>
|
|
19
|
+
<zeebe:taskDefinition type="senior:plan" />
|
|
20
|
+
<zeebe:taskHeaders>
|
|
21
|
+
<zeebe:header key="io.nanobpm.agentTask.task.prompt" value="{{plan}}" />
|
|
22
|
+
</zeebe:taskHeaders>
|
|
23
|
+
<zeebe:ioMapping>
|
|
24
|
+
<zeebe:input source="=(if (planFindings = null or planFindings = "") then "" else " --- A prior review REJECTED your last plan. Address every point, then re-emit the full plan: " + planFindings)" target="appendPrompt" />
|
|
25
|
+
</zeebe:ioMapping>
|
|
26
|
+
</bpmn:extensionElements>
|
|
27
|
+
<bpmn:incoming>f_toPlan</bpmn:incoming>
|
|
28
|
+
<bpmn:incoming>f_plan_revise</bpmn:incoming>
|
|
29
|
+
<bpmn:outgoing>f_toRecordPlan</bpmn:outgoing>
|
|
30
|
+
</bpmn:serviceTask>
|
|
31
|
+
<bpmn:serviceTask id="record-plan" name="Record plan & levelize">
|
|
32
|
+
<bpmn:extensionElements>
|
|
33
|
+
<zeebe:taskDefinition type="pr.record-plan" />
|
|
34
|
+
</bpmn:extensionElements>
|
|
35
|
+
<bpmn:incoming>f_toRecordPlan</bpmn:incoming>
|
|
36
|
+
<bpmn:outgoing>f_toReviewPlan</bpmn:outgoing>
|
|
37
|
+
</bpmn:serviceTask>
|
|
38
|
+
<bpmn:serviceTask id="review-plan" name="Review plan (agent)">
|
|
39
|
+
<bpmn:extensionElements>
|
|
40
|
+
<zeebe:taskDefinition type="senior:plan-review" />
|
|
41
|
+
<zeebe:taskHeaders>
|
|
42
|
+
<zeebe:header key="io.nanobpm.agentTask.task.prompt" value="{{plan-review}}" />
|
|
43
|
+
</zeebe:taskHeaders>
|
|
44
|
+
</bpmn:extensionElements>
|
|
45
|
+
<bpmn:incoming>f_toReviewPlan</bpmn:incoming>
|
|
46
|
+
<bpmn:outgoing>f_toRecordPlanReview</bpmn:outgoing>
|
|
47
|
+
</bpmn:serviceTask>
|
|
48
|
+
<bpmn:serviceTask id="record-plan-review" name="Record review & decide">
|
|
49
|
+
<bpmn:extensionElements>
|
|
50
|
+
<zeebe:taskDefinition type="pr.record-plan-review" />
|
|
51
|
+
</bpmn:extensionElements>
|
|
52
|
+
<bpmn:incoming>f_toRecordPlanReview</bpmn:incoming>
|
|
53
|
+
<bpmn:outgoing>f_toGwPlanReview</bpmn:outgoing>
|
|
54
|
+
</bpmn:serviceTask>
|
|
55
|
+
<bpmn:exclusiveGateway id="gw-plan-review" name="plan approved?" default="f_plan_revise">
|
|
56
|
+
<bpmn:incoming>f_toGwPlanReview</bpmn:incoming>
|
|
57
|
+
<bpmn:outgoing>f_plan_proceed</bpmn:outgoing>
|
|
58
|
+
<bpmn:outgoing>f_plan_revise</bpmn:outgoing>
|
|
59
|
+
</bpmn:exclusiveGateway>
|
|
60
|
+
<bpmn:serviceTask id="select-wave" name="Select wave">
|
|
61
|
+
<bpmn:extensionElements>
|
|
62
|
+
<zeebe:taskDefinition type="pr.select-wave" />
|
|
63
|
+
</bpmn:extensionElements>
|
|
64
|
+
<bpmn:incoming>f_plan_proceed</bpmn:incoming>
|
|
65
|
+
<bpmn:incoming>f_waveMerged</bpmn:incoming>
|
|
66
|
+
<bpmn:outgoing>f_toImplement</bpmn:outgoing>
|
|
67
|
+
</bpmn:serviceTask>
|
|
68
|
+
<bpmn:subProcess id="implement" name="Implement task (agent)">
|
|
69
|
+
<bpmn:extensionElements>
|
|
70
|
+
<zeebe:ioMapping>
|
|
71
|
+
<zeebe:input source="=null" target="answer" />
|
|
72
|
+
<zeebe:input source="=null" target="status" />
|
|
73
|
+
<zeebe:input source="=null" target="summary" />
|
|
74
|
+
<zeebe:input source="=null" target="pr" />
|
|
75
|
+
<zeebe:input source="=null" target="question" />
|
|
76
|
+
<zeebe:input source="=null" target="delta" />
|
|
77
|
+
</zeebe:ioMapping>
|
|
78
|
+
</bpmn:extensionElements>
|
|
79
|
+
<bpmn:incoming>f_toImplement</bpmn:incoming>
|
|
80
|
+
<bpmn:outgoing>f_toRecordWave</bpmn:outgoing>
|
|
81
|
+
<bpmn:multiInstanceLoopCharacteristics>
|
|
82
|
+
<bpmn:extensionElements>
|
|
83
|
+
<zeebe:loopCharacteristics inputCollection="=waveTasks" inputElement="task" outputCollection="waveResults" outputElement="={status: status, summary: summary, pr: pr, delta: delta}" />
|
|
84
|
+
</bpmn:extensionElements>
|
|
85
|
+
</bpmn:multiInstanceLoopCharacteristics>
|
|
86
|
+
<bpmn:startEvent id="w_start" name="Task">
|
|
87
|
+
<bpmn:outgoing>w_toImpl</bpmn:outgoing>
|
|
88
|
+
</bpmn:startEvent>
|
|
89
|
+
<bpmn:serviceTask id="implement-task" name="Implement (agent)">
|
|
90
|
+
<bpmn:extensionElements>
|
|
91
|
+
<zeebe:taskDefinition type="senior:feature" />
|
|
92
|
+
<zeebe:taskHeaders>
|
|
93
|
+
<zeebe:header key="io.nanobpm.agentTask.task.prompt" value="{{feature}}" />
|
|
94
|
+
</zeebe:taskHeaders>
|
|
95
|
+
<zeebe:ioMapping>
|
|
96
|
+
<zeebe:input source="=" --- " + task.prompt + (if (blackboardBrief = null) then "" else blackboardBrief)" target="appendPrompt" />
|
|
97
|
+
</zeebe:ioMapping>
|
|
98
|
+
</bpmn:extensionElements>
|
|
99
|
+
<bpmn:incoming>w_toImpl</bpmn:incoming>
|
|
100
|
+
<bpmn:incoming>w_answerLoop</bpmn:incoming>
|
|
101
|
+
<bpmn:outgoing>w_toGw</bpmn:outgoing>
|
|
102
|
+
</bpmn:serviceTask>
|
|
103
|
+
<bpmn:exclusiveGateway id="w_gw" name="escalated?" default="w_done">
|
|
104
|
+
<bpmn:incoming>w_toGw</bpmn:incoming>
|
|
105
|
+
<bpmn:outgoing>w_escalate</bpmn:outgoing>
|
|
106
|
+
<bpmn:outgoing>w_done</bpmn:outgoing>
|
|
107
|
+
</bpmn:exclusiveGateway>
|
|
108
|
+
<bpmn:serviceTask id="persist-task-escalation" name="Record task escalation">
|
|
109
|
+
<bpmn:extensionElements>
|
|
110
|
+
<zeebe:taskDefinition type="pr.persist-task-escalation" />
|
|
111
|
+
</bpmn:extensionElements>
|
|
112
|
+
<bpmn:incoming>w_escalate</bpmn:incoming>
|
|
113
|
+
<bpmn:outgoing>w_toWait</bpmn:outgoing>
|
|
114
|
+
</bpmn:serviceTask>
|
|
115
|
+
<bpmn:intermediateCatchEvent id="wait-feature-answer" name="Wait: human answer">
|
|
116
|
+
<bpmn:incoming>w_toWait</bpmn:incoming>
|
|
117
|
+
<bpmn:outgoing>w_answerLoop</bpmn:outgoing>
|
|
118
|
+
<bpmn:messageEventDefinition id="med_featureAnswered" messageRef="Message_featureEscalationAnswered" />
|
|
119
|
+
</bpmn:intermediateCatchEvent>
|
|
120
|
+
<bpmn:endEvent id="w_end" name="Task done">
|
|
121
|
+
<bpmn:incoming>w_done</bpmn:incoming>
|
|
122
|
+
</bpmn:endEvent>
|
|
123
|
+
<bpmn:sequenceFlow id="w_toImpl" sourceRef="w_start" targetRef="implement-task" />
|
|
124
|
+
<bpmn:sequenceFlow id="w_toGw" sourceRef="implement-task" targetRef="w_gw" />
|
|
125
|
+
<bpmn:sequenceFlow id="w_escalate" name="escalated" sourceRef="w_gw" targetRef="persist-task-escalation">
|
|
126
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=status = "escalated"</bpmn:conditionExpression>
|
|
127
|
+
</bpmn:sequenceFlow>
|
|
128
|
+
<bpmn:sequenceFlow id="w_done" name="done" sourceRef="w_gw" targetRef="w_end" />
|
|
129
|
+
<bpmn:sequenceFlow id="w_toWait" sourceRef="persist-task-escalation" targetRef="wait-feature-answer" />
|
|
130
|
+
<bpmn:sequenceFlow id="w_answerLoop" sourceRef="wait-feature-answer" targetRef="implement-task" />
|
|
131
|
+
</bpmn:subProcess>
|
|
132
|
+
<bpmn:serviceTask id="record-wave" name="Record wave & hand off">
|
|
133
|
+
<bpmn:extensionElements>
|
|
134
|
+
<zeebe:taskDefinition type="pr.record-wave" />
|
|
135
|
+
</bpmn:extensionElements>
|
|
136
|
+
<bpmn:incoming>f_toRecordWave</bpmn:incoming>
|
|
137
|
+
<bpmn:outgoing>f_toTrialNeeded</bpmn:outgoing>
|
|
138
|
+
</bpmn:serviceTask>
|
|
139
|
+
<bpmn:exclusiveGateway id="gw-trial-needed" name="trial merge?" default="f_skipTrialMerge">
|
|
140
|
+
<bpmn:incoming>f_toTrialNeeded</bpmn:incoming>
|
|
141
|
+
<bpmn:outgoing>f_runTrialMerge</bpmn:outgoing>
|
|
142
|
+
<bpmn:outgoing>f_skipTrialMerge</bpmn:outgoing>
|
|
143
|
+
</bpmn:exclusiveGateway>
|
|
144
|
+
<bpmn:serviceTask id="trial-merge" name="Trial merge (agent)">
|
|
145
|
+
<bpmn:extensionElements>
|
|
146
|
+
<zeebe:taskDefinition type="senior:trial-merge" />
|
|
147
|
+
<zeebe:taskHeaders>
|
|
148
|
+
<zeebe:header key="io.nanobpm.agentTask.task.prompt" value="{{trial-merge}}" />
|
|
149
|
+
</zeebe:taskHeaders>
|
|
150
|
+
<zeebe:ioMapping>
|
|
151
|
+
<zeebe:input source="=null" target="result" />
|
|
152
|
+
<zeebe:input source="=null" target="conflicts" />
|
|
153
|
+
<zeebe:input source="=null" target="failing" />
|
|
154
|
+
<zeebe:input source="=null" target="summary" />
|
|
155
|
+
<zeebe:input source="=null" target="answer" />
|
|
156
|
+
</zeebe:ioMapping>
|
|
157
|
+
</bpmn:extensionElements>
|
|
158
|
+
<bpmn:incoming>f_runTrialMerge</bpmn:incoming>
|
|
159
|
+
<bpmn:incoming>f_trialAnswerRerun</bpmn:incoming>
|
|
160
|
+
<bpmn:outgoing>f_toRecordTrialMerge</bpmn:outgoing>
|
|
161
|
+
</bpmn:serviceTask>
|
|
162
|
+
<bpmn:serviceTask id="record-trial-merge" name="Record trial merge">
|
|
163
|
+
<bpmn:extensionElements>
|
|
164
|
+
<zeebe:taskDefinition type="pr.record-trial-merge" />
|
|
165
|
+
</bpmn:extensionElements>
|
|
166
|
+
<bpmn:incoming>f_toRecordTrialMerge</bpmn:incoming>
|
|
167
|
+
<bpmn:outgoing>f_toGwTrial</bpmn:outgoing>
|
|
168
|
+
</bpmn:serviceTask>
|
|
169
|
+
<bpmn:exclusiveGateway id="gw-trial" name="trial red?" default="f_trialProceed">
|
|
170
|
+
<bpmn:incoming>f_toGwTrial</bpmn:incoming>
|
|
171
|
+
<bpmn:outgoing>f_trialEscalate</bpmn:outgoing>
|
|
172
|
+
<bpmn:outgoing>f_trialProceed</bpmn:outgoing>
|
|
173
|
+
</bpmn:exclusiveGateway>
|
|
174
|
+
<bpmn:serviceTask id="persist-trial-escalation" name="Record trial escalation">
|
|
175
|
+
<bpmn:extensionElements>
|
|
176
|
+
<zeebe:taskDefinition type="pr.persist-task-escalation" />
|
|
177
|
+
</bpmn:extensionElements>
|
|
178
|
+
<bpmn:incoming>f_trialEscalate</bpmn:incoming>
|
|
179
|
+
<bpmn:outgoing>f_toWaitTrial</bpmn:outgoing>
|
|
180
|
+
</bpmn:serviceTask>
|
|
181
|
+
<bpmn:intermediateCatchEvent id="wait-trial-answer" name="Wait: trial answer">
|
|
182
|
+
<bpmn:incoming>f_toWaitTrial</bpmn:incoming>
|
|
183
|
+
<bpmn:outgoing>f_toGwTrialAnswer</bpmn:outgoing>
|
|
184
|
+
<bpmn:messageEventDefinition id="med_trialAnswered" messageRef="Message_featureEscalationAnswered" />
|
|
185
|
+
</bpmn:intermediateCatchEvent>
|
|
186
|
+
<bpmn:exclusiveGateway id="gw-trial-answer" name="proceed override?" default="f_trialAnswerRerun">
|
|
187
|
+
<bpmn:incoming>f_toGwTrialAnswer</bpmn:incoming>
|
|
188
|
+
<bpmn:outgoing>f_trialAnswerProceed</bpmn:outgoing>
|
|
189
|
+
<bpmn:outgoing>f_trialAnswerRerun</bpmn:outgoing>
|
|
190
|
+
</bpmn:exclusiveGateway>
|
|
191
|
+
<bpmn:exclusiveGateway id="gw-more" name="more waves?" default="f_done">
|
|
192
|
+
<bpmn:incoming>f_skipTrialMerge</bpmn:incoming>
|
|
193
|
+
<bpmn:incoming>f_trialProceed</bpmn:incoming>
|
|
194
|
+
<bpmn:incoming>f_trialAnswerProceed</bpmn:incoming>
|
|
195
|
+
<bpmn:outgoing>f_moreWaves</bpmn:outgoing>
|
|
196
|
+
<bpmn:outgoing>f_done</bpmn:outgoing>
|
|
197
|
+
</bpmn:exclusiveGateway>
|
|
198
|
+
<bpmn:intermediateCatchEvent id="wait-wave-merged" name="Wait: wave merged">
|
|
199
|
+
<bpmn:incoming>f_moreWaves</bpmn:incoming>
|
|
200
|
+
<bpmn:outgoing>f_waveMerged</bpmn:outgoing>
|
|
201
|
+
<bpmn:messageEventDefinition id="med_waveMerged" messageRef="Message_waveMerged" />
|
|
202
|
+
</bpmn:intermediateCatchEvent>
|
|
203
|
+
<bpmn:serviceTask id="record-results" name="Finalize plan">
|
|
204
|
+
<bpmn:extensionElements>
|
|
205
|
+
<zeebe:taskDefinition type="pr.record-results" />
|
|
206
|
+
</bpmn:extensionElements>
|
|
207
|
+
<bpmn:incoming>f_done</bpmn:incoming>
|
|
208
|
+
<bpmn:outgoing>f_toEnd</bpmn:outgoing>
|
|
209
|
+
</bpmn:serviceTask>
|
|
210
|
+
<bpmn:endEvent id="End" name="Fleet dispatched">
|
|
211
|
+
<bpmn:incoming>f_toEnd</bpmn:incoming>
|
|
212
|
+
</bpmn:endEvent>
|
|
213
|
+
<bpmn:sequenceFlow id="f_toPlan" sourceRef="Start" targetRef="plan" />
|
|
214
|
+
<bpmn:sequenceFlow id="f_toRecordPlan" sourceRef="plan" targetRef="record-plan" />
|
|
215
|
+
<bpmn:sequenceFlow id="f_toReviewPlan" sourceRef="record-plan" targetRef="review-plan" />
|
|
216
|
+
<bpmn:sequenceFlow id="f_toRecordPlanReview" sourceRef="review-plan" targetRef="record-plan-review" />
|
|
217
|
+
<bpmn:sequenceFlow id="f_toGwPlanReview" sourceRef="record-plan-review" targetRef="gw-plan-review" />
|
|
218
|
+
<bpmn:sequenceFlow id="f_plan_proceed" name="approved" sourceRef="gw-plan-review" targetRef="select-wave">
|
|
219
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=planApproved or reviewExhausted</bpmn:conditionExpression>
|
|
220
|
+
</bpmn:sequenceFlow>
|
|
221
|
+
<bpmn:sequenceFlow id="f_plan_revise" name="revise" sourceRef="gw-plan-review" targetRef="plan" />
|
|
222
|
+
<bpmn:sequenceFlow id="f_toImplement" sourceRef="select-wave" targetRef="implement" />
|
|
223
|
+
<bpmn:sequenceFlow id="f_toRecordWave" sourceRef="implement" targetRef="record-wave" />
|
|
224
|
+
<bpmn:sequenceFlow id="f_toTrialNeeded" sourceRef="record-wave" targetRef="gw-trial-needed" />
|
|
225
|
+
<bpmn:sequenceFlow id="f_runTrialMerge" name="run" sourceRef="gw-trial-needed" targetRef="trial-merge">
|
|
226
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=runTrialMerge</bpmn:conditionExpression>
|
|
227
|
+
</bpmn:sequenceFlow>
|
|
228
|
+
<bpmn:sequenceFlow id="f_skipTrialMerge" name="skip" sourceRef="gw-trial-needed" targetRef="gw-more" />
|
|
229
|
+
<bpmn:sequenceFlow id="f_toRecordTrialMerge" sourceRef="trial-merge" targetRef="record-trial-merge" />
|
|
230
|
+
<bpmn:sequenceFlow id="f_toGwTrial" sourceRef="record-trial-merge" targetRef="gw-trial" />
|
|
231
|
+
<bpmn:sequenceFlow id="f_trialEscalate" name="suite failed" sourceRef="gw-trial" targetRef="persist-trial-escalation">
|
|
232
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=trialMergeRed</bpmn:conditionExpression>
|
|
233
|
+
</bpmn:sequenceFlow>
|
|
234
|
+
<bpmn:sequenceFlow id="f_trialProceed" name="proceed" sourceRef="gw-trial" targetRef="gw-more" />
|
|
235
|
+
<bpmn:sequenceFlow id="f_toWaitTrial" sourceRef="persist-trial-escalation" targetRef="wait-trial-answer" />
|
|
236
|
+
<bpmn:sequenceFlow id="f_toGwTrialAnswer" sourceRef="wait-trial-answer" targetRef="gw-trial-answer" />
|
|
237
|
+
<bpmn:sequenceFlow id="f_trialAnswerProceed" name="proceed" sourceRef="gw-trial-answer" targetRef="gw-more">
|
|
238
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=answer = "proceed"</bpmn:conditionExpression>
|
|
239
|
+
</bpmn:sequenceFlow>
|
|
240
|
+
<bpmn:sequenceFlow id="f_trialAnswerRerun" name="rerun" sourceRef="gw-trial-answer" targetRef="trial-merge" />
|
|
241
|
+
<bpmn:sequenceFlow id="f_moreWaves" name="more" sourceRef="gw-more" targetRef="wait-wave-merged">
|
|
242
|
+
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=hasMoreWaves</bpmn:conditionExpression>
|
|
243
|
+
</bpmn:sequenceFlow>
|
|
244
|
+
<bpmn:sequenceFlow id="f_waveMerged" sourceRef="wait-wave-merged" targetRef="select-wave" />
|
|
245
|
+
<bpmn:sequenceFlow id="f_done" name="done" sourceRef="gw-more" targetRef="record-results" />
|
|
246
|
+
<bpmn:sequenceFlow id="f_toEnd" sourceRef="record-results" targetRef="End" />
|
|
247
|
+
</bpmn:process>
|
|
248
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_plan-fanout">
|
|
249
|
+
<bpmndi:BPMNPlane id="BPMNPlane_plan-fanout" bpmnElement="plan-fanout">
|
|
250
|
+
<bpmndi:BPMNShape id="BPMNShape_Start" bpmnElement="Start">
|
|
251
|
+
<dc:Bounds x="80" y="222" width="36" height="36" />
|
|
252
|
+
<bpmndi:BPMNLabel>
|
|
253
|
+
<dc:Bounds x="63" y="263" width="70" height="28" />
|
|
254
|
+
</bpmndi:BPMNLabel>
|
|
255
|
+
</bpmndi:BPMNShape>
|
|
256
|
+
<bpmndi:BPMNShape id="BPMNShape_plan" bpmnElement="plan">
|
|
257
|
+
<dc:Bounds x="216" y="200" width="100" height="80" />
|
|
258
|
+
</bpmndi:BPMNShape>
|
|
259
|
+
<bpmndi:BPMNShape id="BPMNShape_record-plan" bpmnElement="record-plan">
|
|
260
|
+
<dc:Bounds x="416" y="200" width="100" height="80" />
|
|
261
|
+
</bpmndi:BPMNShape>
|
|
262
|
+
<bpmndi:BPMNShape id="BPMNShape_review-plan" bpmnElement="review-plan">
|
|
263
|
+
<dc:Bounds x="616" y="200" width="100" height="80" />
|
|
264
|
+
</bpmndi:BPMNShape>
|
|
265
|
+
<bpmndi:BPMNShape id="BPMNShape_record-plan-review" bpmnElement="record-plan-review">
|
|
266
|
+
<dc:Bounds x="816" y="200" width="100" height="80" />
|
|
267
|
+
</bpmndi:BPMNShape>
|
|
268
|
+
<bpmndi:BPMNShape id="BPMNShape_gw-plan-review" bpmnElement="gw-plan-review" isMarkerVisible="true">
|
|
269
|
+
<dc:Bounds x="1016" y="215" width="50" height="50" />
|
|
270
|
+
<bpmndi:BPMNLabel>
|
|
271
|
+
<dc:Bounds x="1008" y="270" width="67" height="28" />
|
|
272
|
+
</bpmndi:BPMNLabel>
|
|
273
|
+
</bpmndi:BPMNShape>
|
|
274
|
+
<bpmndi:BPMNShape id="BPMNShape_select-wave" bpmnElement="select-wave">
|
|
275
|
+
<dc:Bounds x="1166" y="200" width="100" height="80" />
|
|
276
|
+
</bpmndi:BPMNShape>
|
|
277
|
+
<bpmndi:BPMNShape id="BPMNShape_implement" bpmnElement="implement" isExpanded="true">
|
|
278
|
+
<dc:Bounds x="1366" y="80" width="802" height="320" />
|
|
279
|
+
</bpmndi:BPMNShape>
|
|
280
|
+
<bpmndi:BPMNShape id="BPMNShape_record-wave" bpmnElement="record-wave">
|
|
281
|
+
<dc:Bounds x="2268" y="200" width="100" height="80" />
|
|
282
|
+
</bpmndi:BPMNShape>
|
|
283
|
+
<bpmndi:BPMNShape id="BPMNShape_gw-trial-needed" bpmnElement="gw-trial-needed" isMarkerVisible="true">
|
|
284
|
+
<dc:Bounds x="2468" y="215" width="50" height="50" />
|
|
285
|
+
<bpmndi:BPMNLabel>
|
|
286
|
+
<dc:Bounds x="2449" y="196" width="88" height="14" />
|
|
287
|
+
</bpmndi:BPMNLabel>
|
|
288
|
+
</bpmndi:BPMNShape>
|
|
289
|
+
<bpmndi:BPMNShape id="BPMNShape_trial-merge" bpmnElement="trial-merge">
|
|
290
|
+
<dc:Bounds x="2618" y="360" width="100" height="80" />
|
|
291
|
+
</bpmndi:BPMNShape>
|
|
292
|
+
<bpmndi:BPMNShape id="BPMNShape_record-trial-merge" bpmnElement="record-trial-merge">
|
|
293
|
+
<dc:Bounds x="2818" y="360" width="100" height="80" />
|
|
294
|
+
</bpmndi:BPMNShape>
|
|
295
|
+
<bpmndi:BPMNShape id="BPMNShape_gw-trial" bpmnElement="gw-trial" isMarkerVisible="true">
|
|
296
|
+
<dc:Bounds x="3018" y="375" width="50" height="50" />
|
|
297
|
+
<bpmndi:BPMNLabel>
|
|
298
|
+
<dc:Bounds x="3073" y="393" width="71" height="14" />
|
|
299
|
+
</bpmndi:BPMNLabel>
|
|
300
|
+
</bpmndi:BPMNShape>
|
|
301
|
+
<bpmndi:BPMNShape id="BPMNShape_persist-trial-escalation" bpmnElement="persist-trial-escalation">
|
|
302
|
+
<dc:Bounds x="3168" y="520" width="100" height="80" />
|
|
303
|
+
</bpmndi:BPMNShape>
|
|
304
|
+
<bpmndi:BPMNShape id="BPMNShape_wait-trial-answer" bpmnElement="wait-trial-answer">
|
|
305
|
+
<dc:Bounds x="3368" y="542" width="36" height="36" />
|
|
306
|
+
<bpmndi:BPMNLabel>
|
|
307
|
+
<dc:Bounds x="3345" y="583" width="82" height="28" />
|
|
308
|
+
</bpmndi:BPMNLabel>
|
|
309
|
+
</bpmndi:BPMNShape>
|
|
310
|
+
<bpmndi:BPMNShape id="BPMNShape_gw-trial-answer" bpmnElement="gw-trial-answer" isMarkerVisible="true">
|
|
311
|
+
<dc:Bounds x="3504" y="535" width="50" height="50" />
|
|
312
|
+
<bpmndi:BPMNLabel>
|
|
313
|
+
<dc:Bounds x="3559" y="546" width="67" height="28" />
|
|
314
|
+
</bpmndi:BPMNLabel>
|
|
315
|
+
</bpmndi:BPMNShape>
|
|
316
|
+
<bpmndi:BPMNShape id="BPMNShape_gw-more" bpmnElement="gw-more" isMarkerVisible="true">
|
|
317
|
+
<dc:Bounds x="3654" y="215" width="50" height="50" />
|
|
318
|
+
<bpmndi:BPMNLabel>
|
|
319
|
+
<dc:Bounds x="3637" y="196" width="84" height="14" />
|
|
320
|
+
</bpmndi:BPMNLabel>
|
|
321
|
+
</bpmndi:BPMNShape>
|
|
322
|
+
<bpmndi:BPMNShape id="BPMNShape_wait-wave-merged" bpmnElement="wait-wave-merged">
|
|
323
|
+
<dc:Bounds x="3836" y="382" width="36" height="36" />
|
|
324
|
+
<bpmndi:BPMNLabel>
|
|
325
|
+
<dc:Bounds x="3815" y="349" width="78" height="28" />
|
|
326
|
+
</bpmndi:BPMNLabel>
|
|
327
|
+
</bpmndi:BPMNShape>
|
|
328
|
+
<bpmndi:BPMNShape id="BPMNShape_record-results" bpmnElement="record-results">
|
|
329
|
+
<dc:Bounds x="3804" y="200" width="100" height="80" />
|
|
330
|
+
</bpmndi:BPMNShape>
|
|
331
|
+
<bpmndi:BPMNShape id="BPMNShape_End" bpmnElement="End">
|
|
332
|
+
<dc:Bounds x="4004" y="222" width="36" height="36" />
|
|
333
|
+
<bpmndi:BPMNLabel>
|
|
334
|
+
<dc:Bounds x="3985" y="263" width="74" height="28" />
|
|
335
|
+
</bpmndi:BPMNLabel>
|
|
336
|
+
</bpmndi:BPMNShape>
|
|
337
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toPlan" bpmnElement="f_toPlan">
|
|
338
|
+
<di:waypoint x="116" y="240" />
|
|
339
|
+
<di:waypoint x="216" y="240" />
|
|
340
|
+
</bpmndi:BPMNEdge>
|
|
341
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toRecordPlan" bpmnElement="f_toRecordPlan">
|
|
342
|
+
<di:waypoint x="316" y="240" />
|
|
343
|
+
<di:waypoint x="416" y="240" />
|
|
344
|
+
</bpmndi:BPMNEdge>
|
|
345
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toReviewPlan" bpmnElement="f_toReviewPlan">
|
|
346
|
+
<di:waypoint x="516" y="240" />
|
|
347
|
+
<di:waypoint x="616" y="240" />
|
|
348
|
+
</bpmndi:BPMNEdge>
|
|
349
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toRecordPlanReview" bpmnElement="f_toRecordPlanReview">
|
|
350
|
+
<di:waypoint x="716" y="240" />
|
|
351
|
+
<di:waypoint x="816" y="240" />
|
|
352
|
+
</bpmndi:BPMNEdge>
|
|
353
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toGwPlanReview" bpmnElement="f_toGwPlanReview">
|
|
354
|
+
<di:waypoint x="916" y="240" />
|
|
355
|
+
<di:waypoint x="1016" y="240" />
|
|
356
|
+
</bpmndi:BPMNEdge>
|
|
357
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_plan_proceed" bpmnElement="f_plan_proceed">
|
|
358
|
+
<di:waypoint x="1066" y="240" />
|
|
359
|
+
<di:waypoint x="1166" y="240" />
|
|
360
|
+
<bpmndi:BPMNLabel>
|
|
361
|
+
<dc:Bounds x="1086" y="218" width="60" height="14" />
|
|
362
|
+
</bpmndi:BPMNLabel>
|
|
363
|
+
</bpmndi:BPMNEdge>
|
|
364
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toImplement" bpmnElement="f_toImplement">
|
|
365
|
+
<di:waypoint x="1266" y="240" />
|
|
366
|
+
<di:waypoint x="1366" y="240" />
|
|
367
|
+
</bpmndi:BPMNEdge>
|
|
368
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toRecordWave" bpmnElement="f_toRecordWave">
|
|
369
|
+
<di:waypoint x="2168" y="240" />
|
|
370
|
+
<di:waypoint x="2268" y="240" />
|
|
371
|
+
</bpmndi:BPMNEdge>
|
|
372
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toTrialNeeded" bpmnElement="f_toTrialNeeded">
|
|
373
|
+
<di:waypoint x="2368" y="240" />
|
|
374
|
+
<di:waypoint x="2468" y="240" />
|
|
375
|
+
</bpmndi:BPMNEdge>
|
|
376
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_skipTrialMerge" bpmnElement="f_skipTrialMerge">
|
|
377
|
+
<di:waypoint x="2518" y="240" />
|
|
378
|
+
<di:waypoint x="3654" y="240" />
|
|
379
|
+
<bpmndi:BPMNLabel>
|
|
380
|
+
<dc:Bounds x="2765" y="218" width="32" height="14" />
|
|
381
|
+
</bpmndi:BPMNLabel>
|
|
382
|
+
</bpmndi:BPMNEdge>
|
|
383
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_done" bpmnElement="f_done">
|
|
384
|
+
<di:waypoint x="3704" y="240" />
|
|
385
|
+
<di:waypoint x="3804" y="240" />
|
|
386
|
+
<bpmndi:BPMNLabel>
|
|
387
|
+
<dc:Bounds x="3748" y="218" width="32" height="14" />
|
|
388
|
+
</bpmndi:BPMNLabel>
|
|
389
|
+
</bpmndi:BPMNEdge>
|
|
390
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toEnd" bpmnElement="f_toEnd">
|
|
391
|
+
<di:waypoint x="3904" y="240" />
|
|
392
|
+
<di:waypoint x="4004" y="240" />
|
|
393
|
+
</bpmndi:BPMNEdge>
|
|
394
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toRecordTrialMerge" bpmnElement="f_toRecordTrialMerge">
|
|
395
|
+
<di:waypoint x="2718" y="400" />
|
|
396
|
+
<di:waypoint x="2818" y="400" />
|
|
397
|
+
</bpmndi:BPMNEdge>
|
|
398
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toGwTrial" bpmnElement="f_toGwTrial">
|
|
399
|
+
<di:waypoint x="2918" y="400" />
|
|
400
|
+
<di:waypoint x="3018" y="400" />
|
|
401
|
+
</bpmndi:BPMNEdge>
|
|
402
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_trialProceed" bpmnElement="f_trialProceed">
|
|
403
|
+
<di:waypoint x="3043" y="375" />
|
|
404
|
+
<di:waypoint x="3043" y="240" />
|
|
405
|
+
<di:waypoint x="3654" y="240" />
|
|
406
|
+
<bpmndi:BPMNLabel>
|
|
407
|
+
<dc:Bounds x="3048" y="301" width="53" height="14" />
|
|
408
|
+
</bpmndi:BPMNLabel>
|
|
409
|
+
</bpmndi:BPMNEdge>
|
|
410
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_trialAnswerRerun" bpmnElement="f_trialAnswerRerun">
|
|
411
|
+
<di:waypoint x="3529" y="585" />
|
|
412
|
+
<di:waypoint x="3529" y="620" />
|
|
413
|
+
<di:waypoint x="2668" y="620" />
|
|
414
|
+
<di:waypoint x="2668" y="440" />
|
|
415
|
+
<bpmndi:BPMNLabel>
|
|
416
|
+
<dc:Bounds x="3079" y="598" width="39" height="14" />
|
|
417
|
+
</bpmndi:BPMNLabel>
|
|
418
|
+
</bpmndi:BPMNEdge>
|
|
419
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_runTrialMerge" bpmnElement="f_runTrialMerge">
|
|
420
|
+
<di:waypoint x="2493" y="265" />
|
|
421
|
+
<di:waypoint x="2493" y="400" />
|
|
422
|
+
<di:waypoint x="2618" y="400" />
|
|
423
|
+
<bpmndi:BPMNLabel>
|
|
424
|
+
<dc:Bounds x="2498" y="326" width="25" height="14" />
|
|
425
|
+
</bpmndi:BPMNLabel>
|
|
426
|
+
</bpmndi:BPMNEdge>
|
|
427
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_trialEscalate" bpmnElement="f_trialEscalate">
|
|
428
|
+
<di:waypoint x="3043" y="425" />
|
|
429
|
+
<di:waypoint x="3043" y="560" />
|
|
430
|
+
<di:waypoint x="3168" y="560" />
|
|
431
|
+
<bpmndi:BPMNLabel>
|
|
432
|
+
<dc:Bounds x="3048" y="486" width="85" height="14" />
|
|
433
|
+
</bpmndi:BPMNLabel>
|
|
434
|
+
</bpmndi:BPMNEdge>
|
|
435
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_trialAnswerProceed" bpmnElement="f_trialAnswerProceed">
|
|
436
|
+
<di:waypoint x="3529" y="535" />
|
|
437
|
+
<di:waypoint x="3529" y="385" />
|
|
438
|
+
<di:waypoint x="3679" y="385" />
|
|
439
|
+
<di:waypoint x="3679" y="265" />
|
|
440
|
+
<bpmndi:BPMNLabel>
|
|
441
|
+
<dc:Bounds x="3578" y="363" width="53" height="14" />
|
|
442
|
+
</bpmndi:BPMNLabel>
|
|
443
|
+
</bpmndi:BPMNEdge>
|
|
444
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_moreWaves" bpmnElement="f_moreWaves">
|
|
445
|
+
<di:waypoint x="3704" y="240" />
|
|
446
|
+
<di:waypoint x="3724" y="240" />
|
|
447
|
+
<di:waypoint x="3724" y="265" />
|
|
448
|
+
<di:waypoint x="3758" y="265" />
|
|
449
|
+
<di:waypoint x="3758" y="420" />
|
|
450
|
+
<di:waypoint x="3836" y="420" />
|
|
451
|
+
<di:waypoint x="3836" y="438" />
|
|
452
|
+
<di:waypoint x="3854" y="438" />
|
|
453
|
+
<di:waypoint x="3854" y="418" />
|
|
454
|
+
<bpmndi:BPMNLabel>
|
|
455
|
+
<dc:Bounds x="3763" y="336" width="35" height="14" />
|
|
456
|
+
</bpmndi:BPMNLabel>
|
|
457
|
+
</bpmndi:BPMNEdge>
|
|
458
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toWaitTrial" bpmnElement="f_toWaitTrial">
|
|
459
|
+
<di:waypoint x="3268" y="560" />
|
|
460
|
+
<di:waypoint x="3368" y="560" />
|
|
461
|
+
</bpmndi:BPMNEdge>
|
|
462
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_toGwTrialAnswer" bpmnElement="f_toGwTrialAnswer">
|
|
463
|
+
<di:waypoint x="3404" y="560" />
|
|
464
|
+
<di:waypoint x="3504" y="560" />
|
|
465
|
+
</bpmndi:BPMNEdge>
|
|
466
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_plan_revise" bpmnElement="f_plan_revise">
|
|
467
|
+
<di:waypoint x="1041" y="215" />
|
|
468
|
+
<di:waypoint x="1041" y="180" />
|
|
469
|
+
<di:waypoint x="266" y="180" />
|
|
470
|
+
<di:waypoint x="266" y="200" />
|
|
471
|
+
<bpmndi:BPMNLabel>
|
|
472
|
+
<dc:Bounds x="631" y="158" width="46" height="14" />
|
|
473
|
+
</bpmndi:BPMNLabel>
|
|
474
|
+
</bpmndi:BPMNEdge>
|
|
475
|
+
<bpmndi:BPMNEdge id="BPMNEdge_f_waveMerged" bpmnElement="f_waveMerged">
|
|
476
|
+
<di:waypoint x="3854" y="418" />
|
|
477
|
+
<di:waypoint x="3854" y="640" />
|
|
478
|
+
<di:waypoint x="1216" y="640" />
|
|
479
|
+
<di:waypoint x="1216" y="280" />
|
|
480
|
+
</bpmndi:BPMNEdge>
|
|
481
|
+
<bpmndi:BPMNShape id="BPMNShape_w_start" bpmnElement="w_start">
|
|
482
|
+
<dc:Bounds x="1406" y="142" width="36" height="36" />
|
|
483
|
+
<bpmndi:BPMNLabel>
|
|
484
|
+
<dc:Bounds x="1407" y="183" width="34" height="14" />
|
|
485
|
+
</bpmndi:BPMNLabel>
|
|
486
|
+
</bpmndi:BPMNShape>
|
|
487
|
+
<bpmndi:BPMNShape id="BPMNShape_implement-task" bpmnElement="implement-task">
|
|
488
|
+
<dc:Bounds x="1542" y="120" width="100" height="80" />
|
|
489
|
+
</bpmndi:BPMNShape>
|
|
490
|
+
<bpmndi:BPMNShape id="BPMNShape_w_gw" bpmnElement="w_gw" isMarkerVisible="true">
|
|
491
|
+
<dc:Bounds x="1742" y="135" width="50" height="50" />
|
|
492
|
+
<bpmndi:BPMNLabel>
|
|
493
|
+
<dc:Bounds x="1730" y="116" width="74" height="14" />
|
|
494
|
+
</bpmndi:BPMNLabel>
|
|
495
|
+
</bpmndi:BPMNShape>
|
|
496
|
+
<bpmndi:BPMNShape id="BPMNShape_persist-task-escalation" bpmnElement="persist-task-escalation">
|
|
497
|
+
<dc:Bounds x="1892" y="280" width="100" height="80" />
|
|
498
|
+
</bpmndi:BPMNShape>
|
|
499
|
+
<bpmndi:BPMNShape id="BPMNShape_wait-feature-answer" bpmnElement="wait-feature-answer">
|
|
500
|
+
<dc:Bounds x="2092" y="302" width="36" height="36" />
|
|
501
|
+
<bpmndi:BPMNLabel>
|
|
502
|
+
<dc:Bounds x="2068" y="269" width="85" height="28" />
|
|
503
|
+
</bpmndi:BPMNLabel>
|
|
504
|
+
</bpmndi:BPMNShape>
|
|
505
|
+
<bpmndi:BPMNShape id="BPMNShape_w_end" bpmnElement="w_end">
|
|
506
|
+
<dc:Bounds x="1924" y="142" width="36" height="36" />
|
|
507
|
+
<bpmndi:BPMNLabel>
|
|
508
|
+
<dc:Bounds x="1909" y="183" width="66" height="14" />
|
|
509
|
+
</bpmndi:BPMNLabel>
|
|
510
|
+
</bpmndi:BPMNShape>
|
|
511
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_toImpl" bpmnElement="w_toImpl">
|
|
512
|
+
<di:waypoint x="1442" y="160" />
|
|
513
|
+
<di:waypoint x="1542" y="160" />
|
|
514
|
+
</bpmndi:BPMNEdge>
|
|
515
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_toGw" bpmnElement="w_toGw">
|
|
516
|
+
<di:waypoint x="1642" y="160" />
|
|
517
|
+
<di:waypoint x="1742" y="160" />
|
|
518
|
+
</bpmndi:BPMNEdge>
|
|
519
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_done" bpmnElement="w_done">
|
|
520
|
+
<di:waypoint x="1792" y="160" />
|
|
521
|
+
<di:waypoint x="1924" y="160" />
|
|
522
|
+
<bpmndi:BPMNLabel>
|
|
523
|
+
<dc:Bounds x="1842" y="138" width="32" height="14" />
|
|
524
|
+
</bpmndi:BPMNLabel>
|
|
525
|
+
</bpmndi:BPMNEdge>
|
|
526
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_escalate" bpmnElement="w_escalate">
|
|
527
|
+
<di:waypoint x="1767" y="185" />
|
|
528
|
+
<di:waypoint x="1767" y="320" />
|
|
529
|
+
<di:waypoint x="1892" y="320" />
|
|
530
|
+
<bpmndi:BPMNLabel>
|
|
531
|
+
<dc:Bounds x="1772" y="246" width="67" height="14" />
|
|
532
|
+
</bpmndi:BPMNLabel>
|
|
533
|
+
</bpmndi:BPMNEdge>
|
|
534
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_toWait" bpmnElement="w_toWait">
|
|
535
|
+
<di:waypoint x="1992" y="320" />
|
|
536
|
+
<di:waypoint x="2092" y="320" />
|
|
537
|
+
</bpmndi:BPMNEdge>
|
|
538
|
+
<bpmndi:BPMNEdge id="BPMNEdge_w_answerLoop" bpmnElement="w_answerLoop">
|
|
539
|
+
<di:waypoint x="2110" y="338" />
|
|
540
|
+
<di:waypoint x="2110" y="380" />
|
|
541
|
+
<di:waypoint x="1592" y="380" />
|
|
542
|
+
<di:waypoint x="1592" y="200" />
|
|
543
|
+
</bpmndi:BPMNEdge>
|
|
544
|
+
</bpmndi:BPMNPlane>
|
|
545
|
+
</bpmndi:BPMNDiagram>
|
|
546
|
+
</bpmn:definitions>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Red/green coverage for the agent-prompt deploy guard (scripts/check-agent-prompts.ts).
|
|
2
|
+
//
|
|
3
|
+
// The guard exists because a `{{token}}` header that resolves to a missing/blank template — or a
|
|
4
|
+
// blank agent-prompt header — ships an effectively prompt-less agent (the root of the empty
|
|
5
|
+
// "(no question provided)" escalations on Magikcraft/nano-bpm #597/#599). These cases assert it
|
|
6
|
+
// fails on each of those shapes and passes on a well-formed app.
|
|
7
|
+
import { assert, assertEquals } from "jsr:@std/assert@1";
|
|
8
|
+
import { checkAgentPrompts } from "./check-agent-prompts.ts";
|
|
9
|
+
|
|
10
|
+
const MANIFEST = JSON.stringify({
|
|
11
|
+
models: { processes: ["resources/processes/*.bpmn"], templates: ["prompts/*.md"] },
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function header(value: string): string {
|
|
15
|
+
return `<zeebe:header key="io.nanobpm.agentTask.task.prompt" value="${value}" />`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Build a throwaway app tree and return its root. Each entry maps a repo-relative path to content.
|
|
19
|
+
async function fixture(files: Record<string, string>): Promise<string> {
|
|
20
|
+
const root = await Deno.makeTempDir({ prefix: "agent-prompts-" });
|
|
21
|
+
for (const [rel, content] of Object.entries(files)) {
|
|
22
|
+
const abs = `${root}/${rel}`;
|
|
23
|
+
await Deno.mkdir(abs.slice(0, abs.lastIndexOf("/")), { recursive: true });
|
|
24
|
+
await Deno.writeTextFile(abs, content);
|
|
25
|
+
}
|
|
26
|
+
return root;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
Deno.test("passes when every {{token}} resolves to a non-blank template", async () => {
|
|
30
|
+
const root = await fixture({
|
|
31
|
+
"nano.app.json": MANIFEST,
|
|
32
|
+
"resources/processes/loop.bpmn": header("{{review-round}}"),
|
|
33
|
+
"prompts/review-round.md": "# Round\nDo the thing.",
|
|
34
|
+
});
|
|
35
|
+
const res = checkAgentPrompts(root);
|
|
36
|
+
assertEquals(res.errors, []);
|
|
37
|
+
assert(res.ok);
|
|
38
|
+
assertEquals(res.resolved, ["review-round"]);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
Deno.test("fails when a header references an undeclared template", async () => {
|
|
42
|
+
const root = await fixture({
|
|
43
|
+
"nano.app.json": MANIFEST,
|
|
44
|
+
"resources/processes/loop.bpmn": header("{{does-not-exist}}"),
|
|
45
|
+
"prompts/review-round.md": "# Round",
|
|
46
|
+
});
|
|
47
|
+
const res = checkAgentPrompts(root);
|
|
48
|
+
assert(!res.ok);
|
|
49
|
+
assert(res.errors.some((e) => e.includes("{{does-not-exist}}") && e.includes("no such template")));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
Deno.test("fails when the referenced template file is blank (would substitute to nothing)", async () => {
|
|
53
|
+
const root = await fixture({
|
|
54
|
+
"nano.app.json": MANIFEST,
|
|
55
|
+
"resources/processes/loop.bpmn": header("{{review-round}}"),
|
|
56
|
+
"prompts/review-round.md": " \n \n",
|
|
57
|
+
});
|
|
58
|
+
const res = checkAgentPrompts(root);
|
|
59
|
+
assert(!res.ok);
|
|
60
|
+
assert(res.errors.some((e) => e.includes("empty") && e.includes("review-round")));
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
Deno.test("fails when a reserved agent-prompt header is blank", async () => {
|
|
64
|
+
const root = await fixture({
|
|
65
|
+
"nano.app.json": MANIFEST,
|
|
66
|
+
"resources/processes/loop.bpmn": header(""),
|
|
67
|
+
"prompts/review-round.md": "# Round",
|
|
68
|
+
});
|
|
69
|
+
const res = checkAgentPrompts(root);
|
|
70
|
+
assert(!res.ok);
|
|
71
|
+
assert(res.errors.some((e) => e.includes("is empty")));
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
Deno.test("checks the real repo: all committed agent prompts resolve", () => {
|
|
75
|
+
// The guard must be green against the actual app it protects — this is the case CI relies on.
|
|
76
|
+
const repoRoot = decodeURIComponent(new URL("../", import.meta.url).pathname);
|
|
77
|
+
const res = checkAgentPrompts(repoRoot);
|
|
78
|
+
assertEquals(res.errors, []);
|
|
79
|
+
assert(res.ok);
|
|
80
|
+
// Every senior:* agent prompt header in the three processes must have resolved.
|
|
81
|
+
for (const t of ["review-round", "fix-ci", "plan", "plan-review", "feature", "trial-merge"]) {
|
|
82
|
+
assert(res.resolved.includes(t), `expected template ${t} to resolve`);
|
|
83
|
+
}
|
|
84
|
+
});
|