You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -421,6 +427,31 @@ The agent can rename identifiers but cannot rewrite arbitrary string literals wi
421
427
- Reduces context-switching cost
422
428
- Allows iOS validation to inform Android design decisions
423
429
430
+
### 6.10 Why no separate ItemTag permissions
431
+
432
+
ItemTag is a child of Shop. Modern collaborative SaaS (Notion, Linear, Trello) treat parent-level permissions as implicitly applying to children. Adding separate ItemTag permissions would:
433
+
434
+
- Double the permission count (shop-level + item-tag-level)
435
+
- Complicate the role-permission matrix for a 2-tier role system
436
+
- Be overkill given that admin and member have nearly identical capabilities in this design
437
+
438
+
The policy file resolves ItemTag operations to Shop permissions:
439
+
-`read_data` → index, show
440
+
-`update_shops` → create, update, destroy, state toggle
441
+
442
+
This matches "collaborative SaaS" model (Notion/Linear/Trello-style): both admin and member can freely CRUD resources; admin's only extra capability is team management (invitation, organization settings).
443
+
444
+
If a future agent-generated domain requires operational separation (e.g., clinic staff can toggle item state but only admin can create items), a new `toggle_item_tags` permission can be introduced alongside a third role tier at that time. For now, keeping permissions minimal is aligned with YAGNI.
445
+
446
+
### 6.11 Why admin and member can both create and modify resources
447
+
448
+
An alternative design (operational SaaS model) would restrict resource creation or state changes to admin only. We chose the collaborative model because:
449
+
450
+
-~90% of agent-generatable domains (task trackers, shopping lists, reading lists, bookmark managers, recipe collections, habit trackers) are collaborative by nature
451
+
- The operational model (clinic waitlist, factory inventory, restaurant service) is a specialized case
452
+
- In collaborative apps, "member" implies peer collaborator, not restricted user
453
+
- If a domain needs the operational model later, a third role tier (`viewer` or `staff`) can be added
ItemTag is a child resource of Shop. In this substrate, there are no separate ItemTag permissions — ItemTag operations are authorized via Shop permissions. This matches modern collaborative SaaS (Notion, Linear, Trello) where parent permissions implicitly apply to children.
472
471
473
-
Replace with generic permission checks:
474
-
-`create_shops` (if treating ItemTag as Shop-scoped)
475
-
-`update_shops`, `delete_shops`, `read_data`
472
+
Mapping:
473
+
-`read_data` → index, show
474
+
-`update_shops` → create, update, destroy, state toggle (complete/idle)
476
475
477
-
Actual mapping depends on the role redesign in Step 12. Initial simpler version: all authenticated shopkeepers can CRUD item_tags within their own account (via `acts_as_tenant` scoping).
0 commit comments