Mediforce workflow definitions and container code for CDISC automation pipelines.
<workflow-name>/
Dockerfile # built with context = this directory
.dockerignore
container/ # scripts copied into the image
src/<workflow-name>.wd.json # workflow definition (registered via CLI)
plugins/ # agent skills (claude-code-agent steps)
test/ # stage scripts run inside the container
- Mediforce CLI — available inside the
mediforcerepo viapnpm exec mediforce. - API key — set
MEDIFORCE_API_KEY(or source.env.local):set -a && source ../mediforce/packages/platform-ui/.env.local && set +a
- Namespace — the namespace must already exist on the target instance.
Local (http://localhost:9003)
# Start the dev server first (from the mediforce repo)
pnpm dev
# Sync the model registry (first time, or after new models are added)
pnpm exec mediforce model sync --base-url=http://localhost:9003
# Register
pnpm exec mediforce workflow register \
--file=protocol-to-synthetic-sdtm/src/protocol-to-synthetic-sdtm.wd.json \
--namespace=<your-namespace> \
--base-url=http://localhost:9003Staging (https://staging.mediforce.ai)
MEDIFORCE_API_KEY=<key> pnpm exec mediforce workflow register \
--file=protocol-to-synthetic-sdtm/src/protocol-to-synthetic-sdtm.wd.json \
--namespace=<your-namespace> \
--base-url=https://staging.mediforce.aipnpm exec mediforce workflow register \
--file=protocol-to-synthetic-sdtm/src/protocol-to-synthetic-sdtm.wd.json \
--namespace=<your-namespace> \
--dry-runWorkflows reference secrets by name (e.g. {{GITHUB_TOKEN}}). Set them per-namespace before starting a run:
pnpm exec mediforce secret set \
--key=GITHUB_TOKEN \
--value="<value>" \
--namespace=<your-namespace> \
--base-url=<url>
pnpm exec mediforce secret set --key=OPENROUTER_API_KEY --value="<value>" ...
pnpm exec mediforce secret set --key=CDISC_API_KEY --value="<value>" ...Secrets are workspace-level (shared across all workflows in the namespace) unless --workflow is specified.
pnpm exec mediforce run start \
--workflow=protocol-to-synthetic-sdtm \
--namespace=<your-namespace> \
--base-url=<url> \
--jsonHuman steps (e.g. provide-inputs) are completed via the UI or mediforce task complete.
- Commit and push to
main. - Copy the new commit SHA (
git rev-parse HEAD). - Update every
"commit"field in the.wd.jsonto the new SHA. - Re-register — the platform assigns the next version number automatically.
NEW_SHA=$(git rev-parse HEAD)
# edit the .wd.json commit fields, then:
pnpm exec mediforce workflow register --file=... --namespace=... --base-url=...- Build context — Docker images are built with the Dockerfile's own directory as context, not the repo root.
COPYpaths are relative to<workflow-name>/. - workspace.remoteAuth — must be set to a secret name containing a GitHub token so the platform clones the repo over HTTPS instead of SSH (SSH is not available on all deployments).
python3— usepython3explicitly incommandfields;pythonmay not be symlinked on older golden image builds.