Clarify Order Management spec audience is internal/staff-facing#21
Open
xavierjohn wants to merge 2 commits into
Open
Clarify Order Management spec audience is internal/staff-facing#21xavierjohn wants to merge 2 commits into
xavierjohn wants to merge 2 commits into
Conversation
Add an explicit Audience note to the Domain Overview: the system's users are staff actors (sales representatives, warehouse managers, administrators) acting on behalf of customers, so an order's customerId is supplied in the request while CreatedByActorId records the staff member who created it. Notes that a customer self-service design would instead derive the customer from the authenticated actor. Resolves the ambiguity between the 'customers place orders' narrative and the staff role model.
There was a problem hiding this comment.
Pull request overview
Adds an explicit clarification to the Order Management specification that the system is internal/staff-facing, so readers (and AI-generated implementations) don’t have to infer whether order creation is customer self-service vs. staff acting on behalf of customers.
Changes:
- Add an “Audience — internal, staff-facing” note to the Domain Overview.
- Clarify that
customerIdis supplied on order creation andCreatedByActorIdtracks the staff actor. - Clarify that
orders:createpermits creating orders for any existing customer (customer-exists check only), not a per-customer ownership model.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…perated API in the Audience note; split into shorter sentences for clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an explicit Audience note to Section 1 (Domain Overview) stating the Order Management system is internal / staff-facing: its users are staff actors (sales representatives, warehouse managers, administrators) acting on behalf of customers.
Why
The overview described the domain as "customers place orders" yet models staff roles (SalesRep, WarehouseManager, Admin) and records a separate
CreatedByActorId— leaving it ambiguous whether the ordering user is the customer or a staff member. That gap is security-relevant: it decides whether accepting a client-suppliedcustomerIdon create is correct (staff acting on behalf) or an IDOR (customer self-service). The note makes the intended model explicit so an AI implementation — and any reviewer — isn't guessing.Note
States that
orders:createauthorizes creating an order for any existing customer (customer-exists check only; no per-customer ownership check), and that a self-service design would instead derive the customer from the authenticated actor rather than trusting a request field.