ShapeDiver Platform + Geometry Workflow Orchestration
Prerequisite: This skill assumes you have already read and followed the
shapediver-router skill. If you arrived here directly, stop — read
shapediver-router first. It selects the correct integration strategy and
gathers required credentials before any implementation skill is read.
This skill is the orchestration layer for cross-system ShapeDiver work. Use it when the
answer must cross the PB -> GB boundary and the main risk is choosing the wrong
identifier, ticket, JWT scope, or host.
Scope And Non-Goals
Use this skill to:
- classify the task as PB-only, GB-only, or combined,
- decide the exact PB -> GB order,
- normalize identifiers and credentials once,
- choose the minimum GB scopes,
- hand off to the Platform or Geometry implementation skill with the right prerequisites.
Do not use this skill as:
- a second full PB SDK manual,
- a second full GB SDK manual,
- a browser Viewer/App Builder implementation skill.
Canonical Decision Order
Always follow this order:
- Classify the task: PB-only, GB-only, or PB+GB combined.
- If PB-only, route to
shapediver-platform-backend.
- If GB-only and the user already has
modelViewUrl plus backend ticket/JWT, route to
shapediver-geometry-backend.
- If combined, continue here and finish PB-side resolution before generating GB runtime
code.
- Normalize identifiers: keep the user-facing slug/id/guid, resolve the canonical PB
model
id, and resolve the canonical GB model guid.
- Choose the runtime credential: embedding ticket for browser embedding, backend ticket
for server/CLI/headless runtime, PB-issued JWT/model token when strong auth or scoped
GB access is required.
- Choose the minimum JWT scopes.
- Build one normalized PB -> GB handoff object.
- Only then load the specialist PB/GB references for exact SDK syntax.
Do not reopen the model-resolution problem later in the answer after this handoff is built.
Canonical PB -> GB Handoff Object
Normalize the bridge values into one explicit object and carry that object forward:
interface IGeometryBackendAccessData {
access_token: string;
model_view_url: string;
ticket?: string;
guid?: string;
guids?: string[];
scopes: string[];
}
Populate it with:
access_token: PB-issued GB JWT/model token when using the repo-default strong-auth
pattern,
model_view_url: the real GB host returned by PB,
ticket: embedding ticket or backend ticket when the session flow is ticket-based,
guid or guids: the canonical GB model identity,
scopes: the exact scopes requested from PB.
Rules:
- Prefer the real
model_view_url from the PB token response.
- Fall back to
backend_system.model_view_url only when that is the actual source you have.
- Keep PB bearer tokens out of this object. They are not GB runtime credentials.
- Do not mix values from different models.
Credential And Scope Selection
Ticket choice:
- embedding ticket: browser embedding only,
- backend ticket: backend runtime, CLI, automation, file upload, compute/export flows,
- author ticket: avoid by default; use it only when the workflow explicitly requires
elevated authoring access.
Ticket lifecycle rule:
- new GB sessions normally start from a PB-generated ticket,
- that ticket is only usable after the Platform-side model exists and the Grasshopper file
upload/check lifecycle has completed successfully.
Scope choice:
GroupView: metadata inspection and output computation,
GroupExport: export computation,
GroupOwner: GB model upload or owner-level GB management,
GroupAnalytics: GB runtime analytics.
Request the smallest scope set that satisfies the task. Do not default to broader scopes.
Token usage rules:
- Use a GB token/JWT when the workflow needs authorization before any session exists, for
example model creation, upload, or other pre-session model-management flows.
- Use a GB token/JWT together with the session flow when the model's
require_token
property is enabled.
Canonical Combined Patterns
Slug/id/guid -> runtime metadata or compute:
- PB authenticate.
- PB resolve the model and capture canonical PB
id and GB guid.
- PB retrieve the backend ticket and, when appropriate, request a model token/JWT plus
model_view_url.
- Build
IGeometryBackendAccessData.
- Load
shapediver-geometry-backend for the actual session/output/export/file code.
Browser embedding setup:
- PB ensure domains and embedding settings are correct.
- PB retrieve embedding ticket and
model_view_url.
- PB request a JWT too when strong authorization is enabled.
- Route onward to
shapediver-viewer or shapediver-appbuilder*.
Upload / check / publish:
- PB
models.create(...).
- PB request a model-management token with
GroupOwner and GroupView, plus the real
model_view_url and guid.
- GB fetch the model upload target by
guid, upload the .gh or .ghx, and poll GB
model status.
- PB patch/sync the PB model status, then publish only if the GB result is confirmed.
Analytics:
- PB resolve the model or model set.
- PB request
GroupAnalytics.
- GB query analytics with
guid or guids.
- Merge the result back into PB-side reporting.
Routing Rules
- Read references/workflow-orchestration.md
first and treat it as the orchestration source of truth for PB -> GB workflows.
- Read references/model-upload-check-publish.md
for the canonical TypeScript workflow that creates the PB model, requests a
model-management token, uploads the Grasshopper file to GB, polls checks, and publishes.
- Read ../shapediver-platform-backend/SKILL.md
when you need the exact Platform-side rules and references.
- Read ../shapediver-geometry-backend/SKILL.md
when you need the exact Geometry-side SDK rules and references.
- Route browser rendering/configurator work to
shapediver-viewer or the
shapediver-appbuilder* skills after credentials and model metadata are settled.
Route To Platform Backend
Route to shapediver-platform-backend when the task ends at:
- auth,
- model lookup,
- domains,
- saved states,
- sharing,
- API tokens / clients,
- PB-only analytics / logs,
- ticket or JWT retrieval with no runtime step.
Route To Geometry Backend
Route to shapediver-geometry-backend when the user already has:
modelViewUrl,
- backend ticket or JWT,
- current parameter/output/export metadata or clear placeholders,
and the task is only:
- session creation,
- output/export computation,
- file parameter upload,
- sdTF runtime processing,
- asset download,
- runtime troubleshooting.
Stay In This Skill
Stay in this skill when the task crosses the PB/GB boundary, especially:
- slug -> runtime metadata,
- slug -> export,
- upload/publish,
- analytics via GB,
- PB credential resolution before headless runtime code,
- any request where the main risk is choosing the wrong credential type, scope, or host.
Cross-System Anti-Patterns
- Do not send PB bearer tokens to GB endpoints.
- Do not use embedding tickets for backend automation.
- Do not use backend tickets for browser embedding flows.
- Do not guess
modelViewUrl; take it from PB data.
- Do not confuse PB model
id with GB guid.
- Do not request broader scopes than needed.
- Do not re-resolve slug/id/guid repeatedly after the handoff object is built.
- Do not mix a ticket from one model with a JWT or
model_view_url from another.
- Do not open a GB session until PB-side resolution is finished.
Exit Criteria
A PB+GB answer is correct only if all of these are true:
- it classifies the task as PB-only, GB-only, or combined,
- it states which system is used first and why,
- it distinguishes PB
id from GB guid,
- it chooses the correct ticket type and minimum JWT scopes,
- it builds or describes one normalized PB -> GB handoff object,
- it uses the real
modelViewUrl returned by PB,
- it delegates exact SDK syntax to the PB or GB specialist skill instead of improvising it
here,
- it states when to route onward to Viewer/App Builder,
- it states when the downstream GB session must be closed or recreated.
1---2name: shapediver-platform-geometry-workflows3description: Use this skill when a ShapeDiver task spans both the Platform Backend and the Geometry Backend in one workflow: starting from a model slug/id/guid or Platform credentials and ending with runtime metadata lookup, session creation, output/export computation, file upload, sdTF processing, model upload/publish, or GB analytics. This is the orchestration layer between the shapediver-platform-backend and shapediver-geometry-backend skills.4license: MIT5---67# ShapeDiver Platform + Geometry Workflow Orchestration89> **Prerequisite:** This skill assumes you have already read and followed the10> `shapediver-router` skill. If you arrived here directly, stop — read11> `shapediver-router` first. It selects the correct integration strategy and12> gathers required credentials before any implementation skill is read.1314This skill is the orchestration layer for cross-system ShapeDiver work. Use it when the15answer must cross the PB -> GB boundary and the main risk is choosing the wrong16identifier, ticket, JWT scope, or host.1718## Scope And Non-Goals1920Use this skill to:2122- classify the task as PB-only, GB-only, or combined,23- decide the exact PB -> GB order,24- normalize identifiers and credentials once,25- choose the minimum GB scopes,26- hand off to the Platform or Geometry implementation skill with the right prerequisites.2728Do not use this skill as:2930- a second full PB SDK manual,31- a second full GB SDK manual,32- a browser Viewer/App Builder implementation skill.3334## Canonical Decision Order3536Always follow this order:37381. Classify the task: PB-only, GB-only, or PB+GB combined.392. If PB-only, route to `shapediver-platform-backend`.403. If GB-only and the user already has `modelViewUrl` plus backend ticket/JWT, route to41 `shapediver-geometry-backend`.424. If combined, continue here and finish PB-side resolution before generating GB runtime43 code.445. Normalize identifiers: keep the user-facing slug/id/guid, resolve the canonical PB45 model `id`, and resolve the canonical GB model `guid`.466. Choose the runtime credential: embedding ticket for browser embedding, backend ticket47 for server/CLI/headless runtime, PB-issued JWT/model token when strong auth or scoped48 GB access is required.497. Choose the minimum JWT scopes.508. Build one normalized PB -> GB handoff object.519. Only then load the specialist PB/GB references for exact SDK syntax.5253Do not reopen the model-resolution problem later in the answer after this handoff is built.5455## Canonical PB -> GB Handoff Object5657Normalize the bridge values into one explicit object and carry that object forward:5859```ts60interface IGeometryBackendAccessData {61 access_token: string;62 model_view_url: string;63 ticket?: string;64 guid?: string;65 guids?: string[];66 scopes: string[];67}68```6970Populate it with:7172- `access_token`: PB-issued GB JWT/model token when using the repo-default strong-auth73 pattern,74- `model_view_url`: the real GB host returned by PB,75- `ticket`: embedding ticket or backend ticket when the session flow is ticket-based,76- `guid` or `guids`: the canonical GB model identity,77- `scopes`: the exact scopes requested from PB.7879Rules:8081- Prefer the real `model_view_url` from the PB token response.82- Fall back to `backend_system.model_view_url` only when that is the actual source you have.83- Keep PB bearer tokens out of this object. They are not GB runtime credentials.84- Do not mix values from different models.8586## Credential And Scope Selection8788Ticket choice:8990- embedding ticket: browser embedding only,91- backend ticket: backend runtime, CLI, automation, file upload, compute/export flows,92- author ticket: avoid by default; use it only when the workflow explicitly requires93 elevated authoring access.9495Ticket lifecycle rule:9697- new GB sessions normally start from a PB-generated ticket,98- that ticket is only usable after the Platform-side model exists and the Grasshopper file99 upload/check lifecycle has completed successfully.100101Scope choice:102103- `GroupView`: metadata inspection and output computation,104- `GroupExport`: export computation,105- `GroupOwner`: GB model upload or owner-level GB management,106- `GroupAnalytics`: GB runtime analytics.107108Request the smallest scope set that satisfies the task. Do not default to broader scopes.109110Token usage rules:111112- Use a GB token/JWT when the workflow needs authorization before any session exists, for113 example model creation, upload, or other pre-session model-management flows.114- Use a GB token/JWT together with the session flow when the model's `require_token`115 property is enabled.116117## Canonical Combined Patterns118119Slug/id/guid -> runtime metadata or compute:1201211. PB authenticate.1222. PB resolve the model and capture canonical PB `id` and GB `guid`.1233. PB retrieve the backend ticket and, when appropriate, request a model token/JWT plus124 `model_view_url`.1254. Build `IGeometryBackendAccessData`.1265. Load `shapediver-geometry-backend` for the actual session/output/export/file code.127128Browser embedding setup:1291301. PB ensure domains and embedding settings are correct.1312. PB retrieve embedding ticket and `model_view_url`.1323. PB request a JWT too when strong authorization is enabled.1334. Route onward to `shapediver-viewer` or `shapediver-appbuilder*`.134135Upload / check / publish:1361371. PB `models.create(...)`.1382. PB request a model-management token with `GroupOwner` and `GroupView`, plus the real139 `model_view_url` and `guid`.1403. GB fetch the model upload target by `guid`, upload the `.gh` or `.ghx`, and poll GB141 model status.1424. PB patch/sync the PB model status, then publish only if the GB result is confirmed.143144Analytics:1451461. PB resolve the model or model set.1472. PB request `GroupAnalytics`.1483. GB query analytics with `guid` or `guids`.1494. Merge the result back into PB-side reporting.150151## Routing Rules152153- Read [references/workflow-orchestration.md](references/workflow-orchestration.md)154 first and treat it as the orchestration source of truth for PB -> GB workflows.155- Read [references/model-upload-check-publish.md](references/model-upload-check-publish.md)156 for the canonical TypeScript workflow that creates the PB model, requests a157 model-management token, uploads the Grasshopper file to GB, polls checks, and publishes.158- Read [../shapediver-platform-backend/SKILL.md](../shapediver-platform-backend/SKILL.md)159 when you need the exact Platform-side rules and references.160- Read [../shapediver-geometry-backend/SKILL.md](../shapediver-geometry-backend/SKILL.md)161 when you need the exact Geometry-side SDK rules and references.162- Route browser rendering/configurator work to `shapediver-viewer` or the163 `shapediver-appbuilder*` skills after credentials and model metadata are settled.164165### Route To Platform Backend166167Route to `shapediver-platform-backend` when the task ends at:168169- auth,170- model lookup,171- domains,172- saved states,173- sharing,174- API tokens / clients,175- PB-only analytics / logs,176- ticket or JWT retrieval with no runtime step.177178### Route To Geometry Backend179180Route to `shapediver-geometry-backend` when the user already has:181182- `modelViewUrl`,183- backend ticket or JWT,184- current parameter/output/export metadata or clear placeholders,185186and the task is only:187188- session creation,189- output/export computation,190- file parameter upload,191- sdTF runtime processing,192- asset download,193- runtime troubleshooting.194195### Stay In This Skill196197Stay in this skill when the task crosses the PB/GB boundary, especially:198199- slug -> runtime metadata,200- slug -> export,201- upload/publish,202- analytics via GB,203- PB credential resolution before headless runtime code,204- any request where the main risk is choosing the wrong credential type, scope, or host.205206## Cross-System Anti-Patterns207208- Do not send PB bearer tokens to GB endpoints.209- Do not use embedding tickets for backend automation.210- Do not use backend tickets for browser embedding flows.211- Do not guess `modelViewUrl`; take it from PB data.212- Do not confuse PB model `id` with GB `guid`.213- Do not request broader scopes than needed.214- Do not re-resolve slug/id/guid repeatedly after the handoff object is built.215- Do not mix a ticket from one model with a JWT or `model_view_url` from another.216- Do not open a GB session until PB-side resolution is finished.217218## Exit Criteria219220A PB+GB answer is correct only if all of these are true:221222- it classifies the task as PB-only, GB-only, or combined,223- it states which system is used first and why,224- it distinguishes PB `id` from GB `guid`,225- it chooses the correct ticket type and minimum JWT scopes,226- it builds or describes one normalized PB -> GB handoff object,227- it uses the real `modelViewUrl` returned by PB,228- it delegates exact SDK syntax to the PB or GB specialist skill instead of improvising it229 here,230- it states when to route onward to Viewer/App Builder,231- it states when the downstream GB session must be closed or recreated.