Skip to content

Support workflow: frontmatter so batch-shaped commands can be backed by dynamic workflows #560

Description

@JustAGhosT

Context

Claude Code now supports dynamic workflows (ultracode): JS scripts executed by a runtime that fan out many isolated, mutually-invisible subagents deterministically (resumable, saveable as reusable /commands) with built-in adversarial verification. They are a strong fit for fixed-shape sweeps over N independent units that produce a pass/fail matrix — exactly the shape of several Retort commands.

An analysis in mystira-workspace (which consumes Retort) identified /review, /project-review, /check, and /security as the ideal workflow-backing candidates: their criteria are pure fan-out, they carry the largest serial context cost, and adversarial verification directly improves audit quality.

The ask (metadata-first, harness deferred)

Do not build the full workflow harness yet (Retort is mid-migration; that risks colliding with framework churn). Instead ship the backward-compatible declaration layer so the fan-out shape is expressed without committing to execution:

  1. Add an optional workflow: frontmatter key (and/or workflowClass / subagents fields in commands.yaml) to the command spec under .agentkit/spec/ and the generator templates under .agentkit/templates/.
  2. Extend the sync-engine schema to accept and round-trip the new key (currently generated command files carry generated_by: 'retort' / last_model: 'sync-engine'; hand-edits to .claude/commands/*.md are clobbered by pnpm retort:sync, so this must live in the spec/templates + schema).
  3. Regenerate via pnpm retort:sync and confirm the new frontmatter appears on /review, /project-review, /check, /security without breaking existing consumers.

Out of scope (defer)

  • workflow-harness.mjs, orchestrator checkpoint schema, phase-function refactor — defer until (a) the mystira read-only workflow trials prove the pattern and (b) the Retort migration settles. Retort should inherit a proven pattern, not a speculative one.

Origin

Filed from a mystira-workspace ultracode fit-analysis (2026-07-03). Reference prototype: mystira added four read-only saved workflows under .claude/workflows/ (/audit-coppa-endpoints, /audit-telemetry-pii, /audit-hexagonal, /audit-cve) whose fan-out workers use the read-only Explore agent type as a tool-layer guardrail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions