Skip to content

Commit e167c99

Browse files
committed
fix(scenarios): make the invoice and project cards write only what their personas may read
add_line and line_without_product no longer write invoice_line.unit_price, which sales_rep must not read; add_task and task_without_title no longer write task.estimate_hours, which contractor must not read. Each operation keeps its persona, its target and its declared outcome. The scenarios README example names remove_ben, the crm card's operation since its fix. Claude-Session: https://claude.ai/code/session_016WV4cyjYBCnWT8iGQXxoeH Co-authored-by: Claude <noreply@anthropic.com>
1 parent f475752 commit e167c99

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎docs/qa/scenarios/invoice_with_line_items.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
"id": "add_line",
128128
"kind": "create",
129129
"object": "invoice_line",
130-
"ask": {"en": "Add 2 Widgets at 5 each to INV-003."},
131-
"values": {"invoice": "i3", "product": "Widget", "quantity": 2, "unit_price": 5, "amount": 10},
130+
"ask": {"en": "Add 2 Widgets to INV-003, 10 in total."},
131+
"values": {"invoice": "i3", "product": "Widget", "quantity": 2, "amount": 10},
132132
"actingAs": "sales_rep",
133133
"outcome": {
134134
"kind": "applied",
@@ -162,8 +162,8 @@
162162
"id": "line_without_product",
163163
"kind": "create",
164164
"object": "invoice_line",
165-
"ask": {"en": "Add a line of 2 at 5 to INV-001, no product."},
166-
"values": {"invoice": "i1", "quantity": 2, "unit_price": 5, "amount": 10},
165+
"ask": {"en": "Add a line of 2, 10 in total, to INV-001, no product."},
166+
"values": {"invoice": "i1", "quantity": 2, "amount": 10},
167167
"actingAs": "sales_rep",
168168
"outcome": {"kind": "refused", "code": "VALIDATION_FAILED"}
169169
},

‎docs/qa/scenarios/project_with_tasks.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110
"id": "add_task",
111111
"kind": "create",
112112
"object": "task",
113-
"ask": {"en": "Add a 3-hour 'Launch checklist' task to the Website relaunch."},
114-
"values": {"title": "Launch checklist", "project": "p1", "status": "todo", "estimate_hours": 3, "assignee": "u_kim"},
113+
"ask": {"en": "Add a 'Launch checklist' task to the Website relaunch."},
114+
"values": {"title": "Launch checklist", "project": "p1", "status": "todo", "assignee": "u_kim"},
115115
"actingAs": "contractor",
116116
"outcome": {
117117
"kind": "applied",
@@ -145,8 +145,8 @@
145145
"id": "task_without_title",
146146
"kind": "create",
147147
"object": "task",
148-
"ask": {"en": "Add a 2-hour task to the Mobile app, with no title."},
149-
"values": {"project": "p2", "status": "todo", "estimate_hours": 2, "assignee": "u_kim"},
148+
"ask": {"en": "Add a task to the Mobile app, with no title."},
149+
"values": {"project": "p2", "status": "todo", "assignee": "u_kim"},
150150
"actingAs": "contractor",
151151
"outcome": {"kind": "refused", "code": "VALIDATION_FAILED"}
152152
},

‎packages/qa/scenarios/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ truths and declared outcomes:
3131
import { gradeCardAnswer, gradeCardOperation, scoreCardArtifact } from '@objectstack/scenarios/score';
3232

3333
scoreCardArtifact(card, artifact); // a built dist/objectstack.json: expect, tags, agent actions
34-
gradeCardOperation(card, 'remove_chen', observed); // an observed write against its declared outcome
34+
gradeCardOperation(card, 'remove_ben', observed); // an observed write against its declared outcome
3535
gradeCardAnswer(card, { question: 'account_count', persona: 'sdr', turn }); // an agent's answer
3636
```
3737

0 commit comments

Comments
 (0)