Coming soon · Contract draft

Programs & Portfolio

Planned

A composable portfolio-to-program-to-project graph with stable rollups and advisory risk explanations.

Reviewable specification — not callable

Documentation-first contract draft. The proposed additions on this page are not callable or available yet. Paths, payloads, scopes, names, and examples are intentionally concrete so customers can review the intended contract before and during implementation.

Canonical owner

Portfolio and program domain services

Contract posture

P2 · 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 portfolio views

Read a stable domain model for programs & portfolio without depending on GUI routes or database shapes.

Manage program membership

Create a reviewable proposal and apply only the bounded commands the canonical owner permits.

Explain portfolio risk

React to durable lifecycle facts and connect external systems with explicit direction and provenance.

Lifecycle and invariants

Programs & Portfolio exposes a bounded lifecycle with explicit commands and named authority at every transition.

draftactivecompletedarchived
FromToCommandAuthority
draftactiveActivate programProgram and portfolio services
activecompletedComplete programProgram and portfolio services
completedarchivedArchive programProgram and portfolio services

Lifecycle invariants

  • Program membership never mutates project schedules.
  • Rollups are derived from canonical project facts.

Authority boundaries

The interfaces expose canonical capabilities; they do not become a second owner of domain rules or state.

DigitalStack owns

  • Program identity and project membership
  • Portfolio filters and saved views
  • Canonical rollup definitions

Explicitly not building

  • Portfolio layers mutating project schedules
  • Unbounded analytics queries
  • Saved views as a second project taxonomy

Surface decisions

Deliberate additions, retained boundaries, and removals from the proposed external contract.

add

Program membership, portfolio rollups, saved filters, and threshold reads

Portfolio consumers need composable structure and stable aggregates.

keep

Risk explanation as advisory output

Portfolio intelligence may shade and explain but cannot become delivery authority.

remove

Unbounded analytics and portfolio containers that own execution

These would create cost risk and MS Project Drift.

add

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

Planned

Versioned programs & portfolio resources, commands, idempotency, and operation status.

Reads + explicit commands

GraphQL

Planned

Composable Program reads with mutations delegated to the same canonical domain service.

Composable reads + bounded delegated mutations

MCP / Agent API

Planned

Bounded read, draft, and confirmed apply tools with evidence and audit attribution.

Read + proposal/confirmed commands only

Webhooks

Planned

Past-tense program lifecycle facts with minimal payloads.

Past-tense durable facts only

Connected Apps

Planned

Power BI / Tableau / warehouse 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.

CapabilityRESTGraphQLMCPWebhookCanonical owner
Primary readGET /programsprogram(id: ID!): Programget_programs_portfolioPortfolio and program domain services
Primary commandPOST /programsdraftProgramChange(input: DraftProgramChangeInput!): ProgramChangeProposal!draft_programs_portfolio_changeprogram.createdPortfolio and program domain services

Proposed scopes

Proposed scopes are not grantable yet.

programs:readplanned scope
Read governed programs & portfolio resources.
programs:writeplanned scope
Create and edit bounded programs & portfolio fields.
programs:operateplanned scope
Run explicit programs & portfolio lifecycle commands.

Behavioral 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 Portfolio and program domain 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

Planned
GET/api/v1/programs

List programs & portfolio

Return an authorized, paginated collection with stable filters and provenance.

programs:read

POST/api/v1/programsconfirmation

Create Program

Create one canonical resource with idempotency and actor attribution.

programs:write

GET/api/v1/programs/{id}

Retrieve Program

Return canonical detail, lifecycle state, permissions, and allowed actions.

programs:read

PATCH/api/v1/programs/{id}confirmation

Update Program

Update bounded editable fields using optimistic versioning.

programs:write

POST/api/v1/programs/{id}/add-projectconfirmation

add project Program

Run one explicit domain command after validation and authorization.

programs:operate

add project a Program

curl --request POST \
+  --url https://www.digitalstack360.com/api/v1/programs/program_123/add-project \
+  --header "Authorization: Bearer $DSTACK_API_KEY" \
+  --header "Content-Type: application/json" \
+  --header "Idempotency-Key: programs-portfolio-add-project-v2" \
+  --data '{
    "expected_version": 2,
    "reason": "Confirmed through the reviewed integration workflow"
  }'
Planned response
{
  "data": {
    "id": "program_123",
    "status": "project_added",
    "version": 3,
    "operation_id": "op_01k4..."
  }
}

GraphQL

Proposed graph

Planned

Types

Program
ProgramConnection
ProgramChangeProposal
Operation

Queries

program(id: ID!): Program
programList(filter: ProgramFilter, pagination: PaginationInput): ProgramConnection!

Mutations

draftProgramChange(input: DraftProgramChangeInput!): ProgramChangeProposal!
applyProgramChange(input: ApplyProgramChangeInput!): ProgramPayload!
Planned GraphQL query
query ProgramDetail($id: ID!) {
  program(id: $id) {
    id
    status
    version
    updatedAt
    allowedActions { id label requiresConfirmation }
    source { kind externalId }
  }
}

MCP / Agent API

Proposed tools

Planned

Get Programs & Portfolio

get_programs_portfolio
Planned

Read the authorized programs & portfolio state, provenance, and allowed actions.

Scope
programs:read
Input
Resource id or a bounded filter.
Output
Canonical detail with source provenance and allowed actions.
Write boundary
Read only.

Draft Programs & Portfolio change

draft_programs_portfolio_change
Planned

Build a reviewable proposal from explicit user intent and DigitalStack evidence.

Scope
programs: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.

Apply Programs & Portfolio change

apply_programs_portfolio_change
Planned

Apply a reviewed proposal through the canonical service.

Scope
programs:operate
Input
Proposal id, expected version, idempotency key, and explicit confirmation.
Output
Updated canonical resource and audit reference.
Write boundary
Confirmation, optimistic versioning, and idempotency required.
Planned agent workflow
User: Review the proposed programs & portfolio change and help me apply it.

1. Call get_programs_portfolio to inspect current state, provenance, and allowed actions.
2. Call draft_programs_portfolio_change to create a proposal without changing canonical state.
3. Show validation results, conflicts, and the exact command to the user.
4. After explicit confirmation, call apply_programs_portfolio_change with the proposal version.

Never infer authority from access to the MCP client.

Webhooks

Proposed event catalog

Planned

Event types

program.createdplanned event

A canonical Program was created.

payload: program_id, status, created_at

program.updatedplanned event

Governed Program fields changed.

payload: program_id, changed_fields, version, occurred_at

program.project_addedplanned event

The add project command completed.

payload: program_id, prior_status, status, occurred_at

Planned event example
{
  "event_id": "evt_01k4...",
  "type": "program.project_added",
  "event_version": 1,
  "occurred_at": "2026-07-16T14:22:04Z",
  "workspace_id": "ws_abc123",
  "resource": {
    "type": "program",
    "id": "program_123"
  },
  "actor": {
    "id": "user_123"
  },
  "payload": {
    "program_id": "program_123",
    "prior_status": "draft",
    "status": "project_added"
  },
  "source": null
}

Connected Apps

Proposed connection roles

Planned

Claude / ChatGPT / IDE clients

Consumer application

Read, explain, and submit bounded programs & portfolio proposals through MCP.

Authority: Client access never implies domain approval or unrestricted mutation authority.

Power BI / Tableau / warehouse

Analytics sink

Consume portfolio rollups and threshold events.

Authority: Read/export only; analytics tools do not write delivery truth.

Open contract decisions

Resolve before implementation approval

  • Which portfolio threshold crossings are durable enough to emit as events?

Proof obligations

Must remain trueFailure indicator
Portfolio and program domain 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.