Skip to content

CAP-CRM-ACT-013Offer work to a security role and reserve it by claim

Markdown

CAP-CRM-ACT-013

Offer work to a security role and reserve it by claim

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision2

Read atservices-crm a8d1364freact-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Role-directed workOne successful role claimantOffers restored by release
Surfaces
api
Preconditions
Platform can evaluate holdings of the candidate role in this workspace.
Intent sources
Andrew 2026-10-18 (role claim), recorded at services-crm:docs/workstreams/crm-tasks-role-claim.md

Controls

23 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004

Permissions

KeyChecked atScope
crm.tasks.readapitenant
crm.tasks.updateapitenant

Business Rules

12 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
A new task can be offered by custom role identifier or built-in role key, but cannot be created both assigned to a person and offered to a role.
origin: Andrew 2026-10-18 (role claim), recorded at services-crm:docs/workstreams/crm-tasks-role-claim.md
no proof recorded yet
validationservice, databasetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#refuses a create naming both an assignee and a role, naming the field, and writes nothing
02must prove
Proposed
Claiming an unqueued role offer requires Platform to confirm the caller holds that role for the workspace; a non-holder receives Forbidden and leaves the offer unchanged.
origin: Andrew 2026-10-18 (role claim), recorded at services-crm:docs/workstreams/crm-tasks-role-claim.md
no proof recorded yet
permissionservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#is refused 403 with the code task_claim_not_role_holder, and the task stays offered
03must prove
Proposed
Concurrent role-holder claims produce one winner and conflicts naming that winner for later claimants.
origin: Andrew 2026-10-18 (role claim), recorded at services-crm:docs/workstreams/crm-tasks-role-claim.md
no proof recorded yet
invariantservicetest
04must prove
Proposed
Claim preserves the candidate role, and release makes the task available to that role again.
origin: Andrew 2026-10-18 (role claim), recorded at services-crm:docs/workstreams/crm-tasks-role-claim.md
no proof recorded yet
policyservicetest
05must prove
Proposed
Reassignment to a different person clears the role offer, while removing the current holder retains it.
no proof recorded yet
policyservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#clears the role when the task is given to somebody other than its holder
06
Proposed
Queued tasks use queue claim rules regardless of any candidate role, so a task updater need not hold that role to claim them.
policyservicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.role-claim.integration.spec.js#is claimed through its queue, as every queued task is, by a user who does not hold the role
07must prove
Proposed
The offered list returns unassigned open tasks outside queues for the user’s roles, ordered oldest first and paged with a maximum of 200 items.
no proof recorded yet
policyapi, servicetest
services-crm:modules/tasks/tests/integration/services/persistence/tasks.queries.integration.spec.js#answers the three tasks offered to the user’s roles, oldest first, then by id
08
Proposed
Ordinary task replacement preserves the candidate role.
policyservicetest
09must prove
Proposed
The console has no role-offer creation control or offered-to-me task view.
no proof recorded yet
policyconsoleunknown
10must prove
Proposed
Role-offer creation checks reference syntax without verifying that the role exists for the customer.
no proof recorded yet
validationserviceobserved
11must prove
Proposed
Offered-task listing omits an active-user check, allowing a service to obtain offers for a user Platform would prevent from claiming.
no proof recorded yet
policyservicedocumented
services-crm:docs/workstreams/crm-tasks-role-claim.md#2. Should "offered to me" read the user's status?
12must prove
Proposed
Role claims pass no related-record resource and therefore use workspace-wide or customer-wide role holdings.
no proof recorded yet
permissionserviceobserved

Scenarios

IdGivenWhenThenProvenance
01An unqueued review task is offered to Reviewers.Let a reviewer and a non-reviewer attempt claims.The reviewer can claim, while the non-holder is forbidden.test
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#gives the task to the first holder to claim it, keeping the role

Edge Cases

IdGivenWhenThenProvenance
02A person holds the candidate role only in a different workspace.Attempt to claim the offered task.Platform membership evaluation rejects the claim.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.