Coming soon · Contract draft
Decisions & Outcomes
A decision contract that makes proposals, evidence, authority, confirmation, and downstream command execution explicit.
Reviewable specification — not callable
Canonical owner
Decision and governed command services
Contract posture
P1 · Documentation first · implementation follows approval
Contract metadata
Draft version
0.2 review draft
Review owner
Delivery/Execute + Developer Platform
Last reviewed
July 14, 2026
Target wave
Wave 2 · Project and Execute core
Contract dependencies
- • Canonical domain service adapter
- • Optimistic concurrency and idempotency policy
- • Transactional event outbox
What this unlocks
Build decision queues
Read a stable domain model for decisions & outcomes without depending on GUI routes or database shapes.
Trace evidence to outcomes
Create a reviewable proposal and apply only the bounded commands the canonical owner permits.
Execute confirmed decisions
React to durable lifecycle facts and connect external systems with explicit direction and provenance.
Lifecycle and invariants
Decisions & Outcomes exposes a bounded lifecycle with explicit commands and named authority at every transition.
proposedconfirmeddeferredsupersededappliedfailed| From | To | Command | Authority |
|---|---|---|---|
| proposed | confirmed | Confirm decision | Decision service and target-domain command owner |
| proposed | deferred | Defer decision | Decision service and target-domain command owner |
| confirmed | applied | Apply governed command | Decision service and target-domain command owner |
| confirmed | failed | Record apply failure | Decision service and target-domain command owner |
Lifecycle invariants
- • Only authorized people confirm decisions.
- • Apply delegates to the affected domain service.
Authority boundaries
The interfaces expose canonical capabilities; they do not become a second owner of domain rules or state.
DigitalStack owns
- • Decision identity and lifecycle
- • Evidence and affected-object links
- • Governed execution and failure history
Explicitly not building
- • Agents making human decisions
- • Decision confirmation implied by chat
- • Bypassing target-domain command authority
Surface decisions
Deliberate additions, retained boundaries, and removals from the proposed external contract.
Decision queue, evidence, affected objects, decision history, and apply result
The contract must trace intent through execution.
Proposal and confirmation as separate states
Chat or MCP context must never imply a decision.
Agent-confirmed decisions and generic execute-anything commands
Decision authority and domain mutation authority remain bounded.
Project/engagement-scoped filtering on every read and command
A workspace API key is not a licence to read every project. Access composes workspace membership with per-project visibility, so integrators receive exactly the engagements they are entitled to.
Interface plan
REST API
PlannedVersioned decisions & outcomes resources, commands, idempotency, and operation status.
Reads + explicit commands
GraphQL
PlannedComposable Decision reads with mutations delegated to the same canonical domain service.
Composable reads + bounded delegated mutations
MCP / Agent API
PlannedBounded read, draft, and human-request tools with evidence and audit attribution.
Read + proposal/confirmed commands only
Webhooks
PlannedPast-tense decision lifecycle facts with minimal payloads.
Past-tense durable facts only
Connected Apps
PlannedSlack / Teams / customer portal plus consumer clients, with declared direction and authority.
Declared direction and field authority required
Cross-interface parity
Each surface delegates to the named canonical owner; a blank surface is an intentional denial of authority, not missing documentation.
| Capability | REST | GraphQL | MCP | Webhook | Canonical owner |
|---|---|---|---|---|---|
| Primary read | GET /decisions | decision(id: ID!): Decision | get_decisions_outcomes | — | Decision and governed command services |
| Primary command | POST /decisions | draftDecisionChange(input: DraftDecisionChangeInput!): DecisionChangeProposal! | draft_decisions_outcomes_change | decision.created | Decision and governed command services |
Proposed scopes
Proposed scopes are not grantable yet.
decisions:readplanned scopedecisions:writeplanned scopedecisions:operateplanned scopeBehavioral contract
Cross-cutting rules every implementation and interface must satisfy.
Project / engagement-scoped access
A project and its engagement are the same object here. Resources are scoped to the projects the principal can access: workspace membership plus project-level visibility — owners and admins see every project, other principals see only the projects they created, were role-assigned, or were added to as members. List endpoints return only visible projects’ resources; detail endpoints enforce that visibility before returning or changing anything.
Canonical delegation
Every interface delegates to Decision and governed command services; no resolver, gateway, worker, or connector reimplements domain rules.
Least-privilege principals
Scopes are evaluated with tenant, role, field-visibility, and principal-type constraints before data is read or changed.
Safe writes
Mutations use explicit confirmation where required, optimistic concurrency, idempotency, and durable actor attribution.
Transactional facts
Webhook facts are emitted from the canonical commit path, versioned, minimal, and safe to redeliver.
Declared provider authority
Every Connected App declares direction, field authority, provenance, and conflict behavior before activation.
REST API
Proposed endpoints
/api/v1/decisionsList decisions & outcomes
Return an authorized, paginated collection with stable filters and provenance.
decisions:read
/api/v1/decisionsconfirmationCreate Decision
Create one canonical resource with idempotency and actor attribution.
decisions:write
/api/v1/decisions/{id}Retrieve Decision
Return canonical detail, lifecycle state, permissions, and allowed actions.
decisions:read
/api/v1/decisions/{id}confirmationUpdate Decision
Update bounded editable fields using optimistic versioning.
decisions:write
/api/v1/decisions/{id}/confirmconfirmationconfirm Decision
Run one explicit domain command after validation and authorization.
decisions:operate
confirm a Decision
curl --request POST \
+ --url https://www.digitalstack360.com/api/v1/decisions/decision_123/confirm \
+ --header "Authorization: Bearer $DSTACK_API_KEY" \
+ --header "Content-Type: application/json" \
+ --header "Idempotency-Key: decisions-outcomes-confirm-v2" \
+ --data '{
"expected_version": 2,
"reason": "Confirmed through the reviewed integration workflow"
}'{
"data": {
"id": "decision_123",
"status": "confirmed",
"version": 3,
"operation_id": "op_01k4..."
}
}GraphQL
Proposed graph
Types
DecisionDecisionConnectionDecisionChangeProposalOperationQueries
decision(id: ID!): DecisiondecisionList(filter: DecisionFilter, pagination: PaginationInput): DecisionConnection!Mutations
draftDecisionChange(input: DraftDecisionChangeInput!): DecisionChangeProposal!query DecisionDetail($id: ID!) {
decision(id: $id) {
id
status
version
updatedAt
allowedActions { id label requiresConfirmation }
source { kind externalId }
}
}MCP / Agent API
Proposed tools
Get Decisions & Outcomes
get_decisions_outcomesRead the authorized decisions & outcomes state, provenance, and allowed actions.
- Scope
- decisions:read
- Input
- Resource id or a bounded filter.
- Output
- Canonical detail with source provenance and allowed actions.
- Write boundary
- Read only.
Draft Decisions & Outcomes change
draft_decisions_outcomes_changeBuild a reviewable proposal from explicit user intent and DigitalStack evidence.
- Scope
- decisions:write
- Input
- Target, requested outcome, expected version, and optional evidence references.
- Output
- A persisted proposal, validation results, and conflicts.
- Write boundary
- Creates a proposal; it does not mutate canonical state.
Request Decisions & Outcomes action
request_decisions_outcomes_actionPrepare an authorized human action request without executing the high-risk command.
- Scope
- decisions:operate
- Input
- Proposal id, expected version, named decision maker, and reason.
- Output
- A pending human-action request and audit reference.
- Write boundary
- The agent cannot execute the final command.
User: Review the proposed decisions & outcomes change and help me apply it.
1. Call get_decisions_outcomes to inspect current state, provenance, and allowed actions.
2. Call draft_decisions_outcomes_change to create a proposal without changing canonical state.
3. Show validation results, conflicts, and the exact command to the user.
4. Call request_decisions_outcomes_action so an authorized human can decide.
Never infer authority from access to the MCP client.Webhooks
Proposed event catalog
Event types
decision.createdplanned eventA canonical Decision was created.
payload: decision_id, status, created_at
decision.updatedplanned eventGoverned Decision fields changed.
payload: decision_id, changed_fields, version, occurred_at
decision.confirmedplanned eventThe confirm command completed.
payload: decision_id, prior_status, status, occurred_at
{
"event_id": "evt_01k4...",
"type": "decision.confirmed",
"event_version": 1,
"occurred_at": "2026-07-16T14:22:04Z",
"workspace_id": "ws_abc123",
"resource": {
"type": "decision",
"id": "decision_123"
},
"actor": {
"id": "user_123"
},
"payload": {
"decision_id": "decision_123",
"prior_status": "draft",
"status": "confirmed"
},
"source": null
}Connected Apps
Proposed connection roles
Claude / ChatGPT / IDE clients
Consumer application
Read, explain, and submit bounded decisions & outcomes proposals through MCP.
Authority: Client access never implies domain approval or unrestricted mutation authority.
Slack / Teams / customer portal
Action sink
Present decision requests and return attributable responses.
Authority: A response is accepted only for an authorized identity and allowed decision.
Open contract decisions
Resolve before implementation approval
- • Which decisions require multiple approvers or customer participation?
Proof obligations
| Must remain true | Failure indicator |
|---|---|
| Decision and governed command services remains the singular canonical owner. | An interface or connector persists a second authoritative lifecycle state. |
| Draft and apply remain separate actions. | An agent or integration silently converts inferred intent into a canonical mutation. |
| Every write is attributable, versioned, and idempotent. | A retry duplicates work or stale state overwrites a newer human decision. |
| Connected App direction and field authority are explicit. | Provider data silently becomes canonical or conflicts are resolved without policy. |