Add ticket subject prefix check to estimate success criteria
The linked ticket subject must start with "Estimate - " before an estimate
task is considered complete. Added as criterion [4] in both the hard rules
block and the workflow success criteria block, with a self-correction step
(PUT /tickets/{id}) if the check fails.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,8 @@ py -c "import datetime; d = datetime.date(YYYY, M, D); print(d.strftime('%A %Y-%
|
||||
1. Every line item requested by the user has been added to the estimate and price-fixed via PUT (verify with GET /estimates/{id} — check `.estimate.line_items[]`)
|
||||
2. Every line item has a corresponding private note on the linked ticket (hidden: true, do_not_email: true) containing: item name, source/retailer, cost, retail price, and any markup
|
||||
3. The estimate total (subtotal + tax) matches the sum of all line items after recalc
|
||||
4. A bot alert has been posted to #bot-alerts
|
||||
4. The linked ticket subject starts with `Estimate - ` (verify with GET /tickets/{id} — check `.ticket.subject`). If it does not, PUT the ticket with the corrected subject before reporting done.
|
||||
5. A bot alert has been posted to #bot-alerts
|
||||
|
||||
If any check fails, complete the missing step before reporting done. This rule fires on initial estimate creation AND on every subsequent "add X to the estimate" request. Incident: 2026-05-22, UPS added to estimate #7189 without a ticket note — caught by Winter.
|
||||
|
||||
@@ -707,7 +708,8 @@ echo "$VERIFY_TKT" | jq '[.ticket.comments[]? | select(.hidden == true) | {subje
|
||||
# [1] estimate line_items count matches number of items user requested
|
||||
# [2] ticket has at least one hidden comment per line item (or one combined note covering all)
|
||||
# [3] estimate subtotal/total match expected values
|
||||
# [4] bot alert posted
|
||||
# [4] ticket subject starts with "Estimate - " (fix with PUT /tickets/{id} if not)
|
||||
# [5] bot alert posted
|
||||
# If any check fails, add the missing note or fix the missing item before completing.
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user