Workflow Packages

Install, create, and distribute pre-built workflow packages.

Workflow packages are the standard format for distributing pre-built workflows in Syntropic137. After running npx @syntropic137/setup init, installing a workflow package is the fastest way to start doing useful work with the platform.

Quick Start

# Install the starter research workflow (the path is inside a clone of
# syntropic137/syntropic137; any local package directory works the same way)
syn workflow install ./workflows/examples/research-package/

# Run it against a repository the GitHub App is installed on
syn workflow run research-package-v1 -R owner/repo \
  --task "Investigate event sourcing patterns for our platform"

# See what's installed
syn workflow packages

-R (--repo, repeatable) names the repositories the workspace clones. A workflow needs at least one unless its YAML sets requires_repos: false, and running on a repository currently needs the GitHub App (#1948).

--task (-t) must say something. syn workflow run <name> -t "" (or a whitespace-only task) is refused by the CLI before any request is sent, and the API answers 422 for a task that is empty or whitespace-only. To run a workflow that takes no task, omit -t (or the task field) entirely.

Installing Packages

Workflow packages can be installed from local directories or git repositories:

# Local directory
syn workflow install ./my-package/

# GitHub repository
syn workflow install https://github.com/org/workflow-library
syn workflow install org/workflow-library              # Shorthand
syn workflow install org/workflow-library --ref v2.0   # Specific version

# Validate before installing
syn workflow install ./my-package/ --dry-run

The install command resolves all prompt files and shared phases, then creates each workflow via the API. Installed packages are tracked locally in ~/.syntropic137/workflows/installed.json.

Package Formats

Single Workflow

The simplest format: one workflow with its phase prompts:

workflow.yaml
discover.md
synthesize.md
README.md

Multi-Workflow Plugin

Bundle multiple workflows with a shared phase library:

syntropic137-plugin.json
workflow.yaml
workflow.yaml
summarize.md
README.md

Shared phases are referenced with the shared:// prefix:

phases:
  - id: summarize
    prompt_file: shared://summarize  # → phase-library/summarize.md

Content is resolved at install time, no runtime dependency on the library.

Creating Packages

Scaffold from Template

# Single workflow
syn workflow init ./my-workflow --name "My Workflow" --type research --phases 3

# Multi-workflow plugin
syn workflow init ./my-plugin --name "My Plugin" --multi

Phase Prompt Files

Phase prompts use optional YAML frontmatter followed by the prompt body:

---
model: sonnet
argument-hint: "[topic]"
allowed-tools: Read,Glob,Grep,Bash
timeout-seconds: 300
---

You are a research assistant investigating: $ARGUMENTS

Use {{discovery}} to reference output from a previous phase.

Frontmatter provides defaults; workflow.yaml values always take precedence.

Plugin Manifest

Multi-workflow plugins use syntropic137-plugin.json for metadata:

{
  "manifest_version": 1,
  "name": "my-plugin",
  "version": "1.0.0",
  "description": "Research and review workflows",
  "author": "my-org",
  "license": "MIT"
}

Choosing an Agent Harness

Syntropic137 runs phases on two agent harnesses: Claude Code (claude -p) and OpenAI Codex (codex exec). Selection is per phase, declared in workflow.yaml under the phase's agent block. There is no CLI flag and no environment variable for it. A single workflow can mix both.

workflow.yaml
id: implement-and-review-v1
name: Implement and Review
phases:
  - id: implement
    name: Implement
    order: 1
    prompt_file: phases/implement.md
    agent:
      provider: claude
      model: sonnet
      allow_delegation: true

  - id: review
    name: Independent Review
    order: 2
    prompt_file: phases/review.md
    agent:
      provider: codex
      model: gpt-sol          # platform alias for gpt-6.1-sol

Running the same work through two vendors is the main reason to mix them. A codex review phase has no memory of the claude implementation phase beyond the artifacts it is handed, so it is a genuinely independent read of the work.

The agent block

FieldValuesDefaultNotes
providerclaude, codexclaudeThe harness that drives the phase. The schema rejects any other value.
modelprovider model id or aliasopus (claude), gpt-sol (codex)Defaults come from SYN_DEFAULT_CLAUDE_MODEL / SYN_DEFAULT_CODEX_MODEL and are recorded at install time. See Codex model ids and cost.
sandboxworkspace-write, full-accessfull-accessCodex phases only. workspace-write is enforced least privilege. See What sandbox actually does.
allow_delegationtrue, falsefalseLets the phase's agent hand work to the other harness. Works in both directions. A permission: a phase whose agent does the work itself still succeeds.
require_delegationtrue, falsefalseMakes delegation mandatory. The phase fails unless a delegate to the other harness reported success, however the agent itself exited. Needs allow_delegation: true.

A phase-level model: key, sitting outside the agent block, takes precedence over agent.model. If you set both, the outer one wins.

Fallback agent (fallback_agent)

A phase may name a second agent to run on, once, when its own provider could not serve it at all:

workflow.yaml
phases:
  - id: implement
    name: Implement
    order: 1
    prompt_file: phases/implement.md
    agent:
      provider: claude
      model: opus
    fallback_agent:
      provider: codex       # required: claude or codex
      model: gpt-sol        # optional: omitted means the provider's default
  • When it runs: only after the primary failed for capacity (after every retry was spent), quota (never retried) or a refusal by the provider's content filter (never retried). Any other failure, including auth, rate_limited and unavailable, is the phase's answer and the fallback does not run.
  • Only if the primary may not have written anything. An attempt that may have changed the workspace or anything beyond it (edited a file, pushed, ran a command not recognised as read-only) is not re-run on the fallback, because the fallback would redo that work. Reading files, searching and viewing a diff do not block it.
  • One attempt. The fallback is not itself retried.
  • Shared limits. It runs with the phase's prompt, tools, sandbox and budget, and draws on the same phase deadline as the primary's attempts, so declaring one never buys the phase more time. If too little time is left, it does not start. The provider rules that bind agent bind fallback_agent at validate and install (for example, max_cost_usd refuses a codex fallback).
  • What is recorded: the execution records the agent that actually produced the result. If the fallback also fails, its error starts with Primary agent <provider>/<model> failed: <reason> so both failures are visible.

What sandbox actually does

sandbox steers codex exec --sandbox. Claude phases ignore it.

LevelCodex mayUse for
workspace-writeRead, write and run commands inside /workspace, including artifacts/output/ and git commits. Writes outside /workspace are denied.Any phase that does not need to reach outside the workspace, including review and verify phases.
full-access (default)Anything the workspace container allows.Phases that genuinely need more.

read-only is refused when you validate, install or execute a workflow. It is enforced, but it denies the write under artifacts/output/ that every phase reports through, so the phase could not publish its result.

Codex enforces these levels with bubblewrap, which runs inside a workspace only because codex-capable workspace images start with a sandbox policy: a narrow seccomp profile, plus the agentic-codex-sandbox AppArmor profile on AppArmor hosts (just apparmor-setup). Without it, every level below full-access fails on its first command.

allowed_tools and the two harnesses

allowed_tools is enforced on claude phases and refused on codex phases (since v0.28.0).

Claude phases. Each name is checked against a fixed vocabulary when the workflow is created or installed: Bash, Edit, Glob, Grep, Read, Skill, Task, WebFetch, WebSearch and Write (ToolName). Matching is case-insensitive, so bash is accepted as Bash, and an unknown name such as git is refused. The list is passed to the CLI as claude --tools <list> (_build_claude_command), so the agent can use only those tools. An empty or omitted list means unrestricted. It restricts tools, not commands: a phase granted Bash can run any shell command, including git. When the workflow declares skills and the phase lists tools, Skill is added automatically so the skills stay usable.

Codex phases. Codex has no tool vocabulary: it enforces where a process may write, not which tools exist. A non-empty allowed_tools on a phase whose agent or fallback_agent is codex is therefore refused when the workflow is created or installed (PhaseYamlDefinition.validate_tool_policy_is_supported_by_provider), again before a workspace is provisioned, and again when the command is built. That includes a list inherited from a prompt file's allowed-tools frontmatter. To bound what a codex phase can write, declare sandbox: workspace-write; see What sandbox actually does.

Frontmatter. A phase prompt file's allowed-tools frontmatter applies only when the phase in workflow.yaml omits allowed_tools; a value in workflow.yaml wins.

Codex authentication

Codex phases need one of two settings on the deployment:

  • CODEX_AUTH_JSON: the full contents of a Codex ~/.codex/auth.json, usually from codex login with a ChatGPT account. Takes priority when both are set, and provisioning logs a warning naming both settings (never their values).
  • OPENAI_API_KEY: an OpenAI API key. Syntropic137 writes it as the same auth.json content that codex login --with-api-key produces, {"auth_mode": "apikey", "OPENAI_API_KEY": "..."}. Usage is billed to the key's OpenAI account.

With neither set, a phase with agent.provider: codex has no credential and cannot authenticate. Claude phases are unaffected.

The agent process itself never receives either environment variable. Provisioning stages the auth.json to a file, relocates it to ~/.codex/auth.json inside the workspace at mode 0600, and deletes the staged copy. A codex agent's environment carries no Claude credentials, which keeps ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN out of reach of a codex run; besides its credential file it gets only non-secret run variables (such as GH_REPO, the phase deadline and attempt identifiers). The exception is allow_delegation: true, which stages both providers' credentials so the agent can call the other CLI. A claude fallback_agent gets the Claude credentials for its own run, and a codex fallback_agent on a claude phase puts ~/.codex/auth.json in the workspace for the whole phase.

GET /health reports which kind of credential is configured in its codex_auth block: an API key shows as api_key, with no expiry. A ChatGPT login shows its access token's expiry when the token carries a readable one.

For a durable deployment credential that a developer running codex login on a laptop cannot revoke, use an OPENAI_API_KEY, or a ChatGPT Business or Enterprise access token. See Codex access tokens: setup and validation.

Claude model aliases

On claude phases, model may be an alias or a concrete Claude model id. The platform translates an alias to the explicit id below before it launches claude --model, and pins the same ids for subagents and syn-delegate claude sessions, so the Claude Code CLI never picks a model by itself. The model a run actually reports always wins, for display and for pricing.

AliasModel it runs
opusclaude-opus-5-5
sonnetclaude-sonnet-5-5
haikuclaude-haiku-5-5
fableclaude-fable-5

Retired Claude models (every Claude model below the 5 family, Haiku 4.5 included) are refused: installing or editing a workflow that names one fails, and a stored phase that names one fails at launch.

Codex model ids and cost

On codex phases, write gpt-sol or a concrete model id such as gpt-6.1-sol. gpt-sol is a platform alias: codex has no aliases of its own, so the platform sends it to codex as --model gpt-6.1-sol and prices the run as gpt-6.1-sol. A codex phase that leaves model unset gets gpt-sol (or whatever SYN_DEFAULT_CODEX_MODEL names), recorded in the workflow when you install it.

Other codex aliases, such as OpenAI's gpt-5.6, are not translated. Codex may reject them, and a model the platform has no rate for lands unpriced rather than wrongly priced.

vendor_cost_usd is always null for codex phases. Token counts are still recorded for both harnesses.

Per-phase cost limit (max_cost_usd)

A phase may declare the most it may spend, in USD:

workflow.yaml
phases:
  - id: implement
    name: Implement
    order: 1
    prompt_file: phases/implement.md
    timeout_seconds: 3600
    max_cost_usd: 5.00
  • The phase's spend is the per-turn token usage on the agent's own stream, priced the same way the execution's cost is. One limit covers every attempt (retry) of the phase.
  • Crossing it stops the agent and fails the phase with cost limit USD 5.00 exceeded at USD 5.12. It is a failure, not a cancel, so the execution can be resumed.
  • Must be greater than 0. Unset (the default) means no limit.
  • Claude phases only. codex exec reports usage once, at the end of the run, so a limit could never stop it. A phase that declares max_cost_usd while its agent or its fallback_agent is codex is refused at validate and install.
  • Checked per turn, not reserved before each call, so turns already in flight can land the final spend above the limit.
  • It is separate from the execution budget (SYN_EXECUTION_MAX_CONCURRENT), which limits concurrent executions, not money.

Per-phase workspace memory (resources.memory_mb)

A phase may ask for more (or less) workspace memory than the deployment default:

workflow.yaml
phases:
  - id: build
    name: Build
    order: 1
    prompt_file: phases/build.md
    resources:
      memory_mb: 12288
  • Unset means the deployment default, SYN_WORKSPACE_MEMORY_LIMIT_MB (4096). The minimum is 256.
  • Per phase: only this phase's workspace gets it, so the phases after a build do not hold the build's memory.
  • The deployment's ceiling is SYN_WORKSPACE_MEMORY_MAX_MB. Unset, nothing above the default is allowed. A request above the ceiling is refused, never clamped: at install, at start with a 422 before any phase runs, and at resume with a 422 before the resume is admitted (if the ceiling was lowered since). syn workflow validate does not know the deployment's ceiling and does not check it.
  • A larger workspace counts as more than one run. Each process hands out at most SYN_EXECUTION_MAX_CONCURRENT x SYN_WORKSPACE_MEMORY_LIMIT_MB of workspace memory, so a 16384 MB phase on a 4096 MB default waits until four default shares are free. Waiting is first come, first served.
  • On E2B the sandbox size is the template's (SYN_E2B_MEMORY_MB); a request above it fails the phase at provisioning.

Per-phase workspace process limit (resources.pids_limit)

Every workspace caps how many processes and threads it may hold (--pids-limit). Threads count, so a test suite that starts a worker and its threads per core (cargo, libtest, node --test, Mesa's lavapipe) can hit the default and fail with fork: Resource temporarily unavailable (EAGAIN). A phase may ask for more:

workflow.yaml
phases:
  - id: test
    name: Test
    order: 1
    prompt_file: phases/test.md
    resources:
      memory_mb: 8192
      pids_limit: 4096
  • Unset means the deployment default, SYN_WORKSPACE_PIDS_LIMIT (256). The minimum is 64.
  • Per phase, like memory: only this phase's workspace gets it.
  • The deployment's ceiling is SYN_WORKSPACE_PIDS_MAX. Unset, it is 1024, or SYN_WORKSPACE_PIDS_LIMIT if that is higher, so the shipped SDLC workflows' gate phases (which ask for 1024) run on a default install. A request above the ceiling is refused, never clamped, at the same points as memory: install, start (422), resume (422) and provisioning. A build given fewer pids than it needs fails late with EAGAIN, which reads like a bug in the code under test.
  • Unlike memory, a higher pids limit does not count as more than one run: it is a per-container cap, not a share of the host.

What each harness gives you

claudecodex
Docker workspace isolationYesYes
Tool-call timelineYesYes, mapped from codex events (command_execution becomes Bash, file_change becomes Edit)
Token accountingYesYes
Vendor cost (vendor_cost_usd)YesNo, always null
Delegation to the other harnessYesYes
Filesystem sandbox enforcementNoYes, workspace-write
Hook events (PreToolUse, PostToolUse)YesNo
Subagent trackingYesNo
TodoWrite and the todo projectionYesNo
Claude plugins (--plugin-dir)YesNo

Claude is the richer harness for observability. Codex is the only one that can enforce a filesystem boundary. Pick per phase accordingly: a codex phase will simply produce no hook, subagent, or todo data, and your dashboards for that phase will be correspondingly thinner.

Skills work on both harnesses, because the pinned skills CLI inside the workspace is harness-neutral.

Exporting Workflows

Export a running workflow from Syntropic137 as a distributable plugin. Exported plugins can be re-imported on another instance or shared via a marketplace.

# Export as a package (workflow.yaml + phase .md files)
syn workflow export <workflow-id> --output ./my-package/

# Export as a plugin (includes CC command wrapper for slash-command invocation)
syn workflow export <workflow-id> --format plugin --output ./my-plugin/

Package Format (default)

Produces a directory that can be re-installed with syn workflow install:

workflow.yaml
discovery.md
synthesis.md
README.md

Plugin Format

Produces a Syntropic137 plugin with a manifest, CC command wrapper, and workflow:

syntropic137-plugin.json
syn-deep-research.md
workflow.yaml
discovery.md
synthesis.md
README.md

The commands/syn-*.md wrapper calls syn workflow run, so the exported workflow can also be invoked as a /syn-* slash command from Claude Code. The package itself is a Syntropic137 plugin: the CC command is a convenience bridge.

Round-Trip Guarantee

Exported packages are always re-importable:

syn workflow export my-workflow-v1 --output ./exported/
syn workflow install ./exported/   # produces an equivalent workflow

Validating Packages

# Validate a package directory
syn workflow validate ./my-package/

# Validate a single YAML file
syn workflow validate ./workflow.yaml

Validation checks the YAML schema, verifies that all referenced .md files exist, and resolves shared:// references.

Retired phase fields

A phase field that no longer does anything is retired. It was first accepted with a warning, so workflows written before the change kept loading, and is now refused: validate and install fail with an error naming the phase, the field and why. Any other unknown field is also an error.

FieldRetiredWhyWhat to do
can_open_prafter #1477Every phase's token carries the installation's own permissions, so every phase may open and comment on a PR. The field decided nothing.Delete the line. There is no replacement.
phase 'open_pr': 'can_open_pr' is retired (#1477) and no longer accepted - ... Delete the line.

Workflows installed before the field was refused keep running: stored history that carries it still replays. Only new validates and installs are refused.

Example Packages

The repository includes reference implementations:

  • workflows/examples/research-package/: Single workflow with discovery + synthesis phases
  • workflows/examples/starter-plugin/: Multi-workflow plugin with shared summarize phase

Marketplace

The marketplace lets you discover, install, and share workflow plugins from GitHub-hosted registries. Any GitHub repository with a marketplace.json at the root can serve as a marketplace.

Register a Marketplace

# Add the official Syntropic137 marketplace
syn marketplace add syntropic137/syntropic137-marketplace

# Add a company-internal marketplace
syn marketplace add myorg/internal-workflows --name my-company

# Add from a specific branch or tag
syn marketplace add myorg/workflows --ref v2.0

# List registered marketplaces
syn marketplace list

# Refresh cached indexes
syn marketplace refresh

# Refresh a specific marketplace
syn marketplace refresh my-company

# Remove a marketplace
syn marketplace remove my-company

Discover Workflows

# Search across all registered marketplaces
syn workflow search "review"
syn workflow search --category sdlc
syn workflow search --tag code-review

# Show details of a specific plugin
syn workflow info code-review

Search matches against plugin name, description, category, and tags (case-insensitive). An empty query returns all plugins across all registries.

Install from Marketplace

# Install by plugin name (resolved from registered marketplaces)
syn workflow install code-review

# Still works: install from local paths and git URLs
syn workflow install ./my-package/
syn workflow install org/repo

When you pass a bare name (no slashes, not a path), the CLI checks registered marketplaces first. If found, it clones the marketplace repo, resolves the plugin's subdirectory, and installs the workflows.

Update and Uninstall

# Update a package to the latest version
syn workflow update code-review

# Check for updates without applying
syn workflow update code-review --dry-run

# Uninstall (removes workflows from the platform)
syn workflow uninstall code-review

# Uninstall but keep workflows running
syn workflow uninstall code-review --keep-workflows

Updates compare the remote git SHA against the installed SHA. If they match, the package is already up to date and no action is taken.

Creating a Marketplace Repository

Any GitHub repository can be a marketplace. Create a marketplace.json at the root and organize plugins in subdirectories. The plugin names below (research-toolkit, pr-automation) are illustrations of the layout, not plugins you can install:

Step 1: Create the Repository Structure

marketplace.json
syntropic137-plugin.json
README.md

Step 2: Write marketplace.json

{
  "name": "my-marketplace",
  "syntropic137": {
    "type": "workflow-marketplace"
  },
  "plugins": [
    {
      "name": "research-toolkit",
      "source": "./plugins/research-toolkit",
      "version": "1.2.0",
      "description": "Deep research and quick-scan workflows",
      "category": "research",
      "tags": ["multi-phase", "deep-dive", "synthesis"]
    },
    {
      "name": "pr-automation",
      "source": "./plugins/pr-automation",
      "version": "0.5.0",
      "description": "Automated PR review and feedback",
      "category": "ci",
      "tags": ["github", "code-review"]
    }
  ]
}

Step 3: Push and Register

git push origin main

# Users register your marketplace:
syn marketplace add your-org/my-marketplace

marketplace.json Schema

The marketplace.json file is the index that describes all plugins in the marketplace. It must be a JSON object at the repository root.

FieldTypeRequiredDescription
namestringYesHuman-readable marketplace name (used as default registry name)
syntropic137objectNoMarker identifying this as a Syntropic137 marketplace. Optional, so plain Claude plugin marketplaces are accepted too
syntropic137.typestringYes, if syntropic137 is presentConventionally "workflow-marketplace"; the CLI does not check the value
syntropic137.min_platform_versionstringNoMinimum platform version (default "0.0.0"). Recorded, not enforced by the CLI
pluginsarrayNoList of plugin entries (default [])

Each plugin entry in the plugins array:

FieldTypeRequiredDescription
namestringYesUnique plugin name (used for syn workflow install <name>)
sourcestringYesRelative path to the plugin directory (e.g., "./plugins/my-plugin")
versionstringNoSemver version string (default "0.1.0")
descriptionstringNoShort description shown in search results
categorystringNoPlugin category (e.g., "research", "ci", "analysis")
tagsarrayNoList of tags for filtering (e.g., ["multi-phase", "github"])

The source path must be relative (no absolute paths or .. traversal). Each plugin directory follows the standard package format: either a single workflow or a multi-workflow plugin.

Caching and Refresh

Marketplace indexes are cached locally at ~/.syntropic137/marketplace/cache/ to avoid cloning on every search or install.

  • Cache TTL: 4 hours. After this, the next search or install re-fetches the index.
  • Force refresh: syn marketplace refresh bypasses the TTL and fetches fresh indexes.
  • Cache location: ~/.syntropic137/marketplace/cache/<registry-name>.json
  • Registry config: ~/.syntropic137/registries.json

Searches and plugin lookups use the cache when fresh, falling back to a fresh fetch when stale. If a fetch fails (network error, repo not found), stale cache entries are skipped silently.

Private Marketplaces

Private GitHub repositories work as marketplaces if git can authenticate. The CLI always clones https://github.com/<org>/<repo>.git with your local git, so what matters is your git configuration for HTTPS GitHub URLs. No special flags are needed.

# Ensure git can clone the private repo over HTTPS, for example:
# - GitHub CLI as the credential helper: gh auth login && gh auth setup-git
# - Any other git credential helper that serves github.com
# - SSH keys only: git config --global url."git@github.com:".insteadOf "https://github.com/"

# Then register normally:
syn marketplace add myorg/private-marketplace --name internal

An SSH key on its own does not help, because the URL is HTTPS; it works only through an insteadOf rule like the one above. GH_TOKEN is not read by the CLI or by git directly. In CI, configure a credential helper that supplies the token (for example gh auth setup-git, which uses GH_TOKEN) or set GIT_ASKPASS.

Troubleshooting

"No marketplace.json found in org/repo": The repository must have a marketplace.json at the root of main (or of the branch or tag given with --ref).

"Invalid registry name": Registry names must start with an alphanumeric character and contain only letters, digits, hyphens, underscores, and dots. Names like ../evil or my/registry are rejected.

Plugin not found after registering: Run syn marketplace refresh to re-fetch the latest index. The local cache may be stale.

Private repo access denied: Ensure git clone https://github.com/<org>/<repo>.git works from your terminal. The CLI uses the same git credentials as your shell.

"Package is already up to date": syn workflow update compares git SHAs. If the remote HEAD hasn't changed, no update is needed.

Limitations

  • One marketplace index per repository (no nested marketplace files)
  • No dependency resolution between plugins
  • No version conflict detection across multiple marketplaces
  • No rollback to a previous plugin version (uninstall and re-install at a pinned --ref)
  • Search is substring-based, not fuzzy or ranked

Phase Outcomes and Artifacts

Every phase ends with a TASK_RESULT block reporting success, and, where they apply, failure_reason and side_effects. The platform weighs that report against the run's exit status to decide whether the phase completed. Every phase must also leave an artifact: whatever it writes under artifacts/output/ is collected, and a phase that wrote nothing has its last message recovered as a marked artifact, or fails if that message says nothing usable. See How a Phase Reports Its Outcome.

Learn More

On this page