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:
- 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/.
- 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).
- 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.
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/securityas 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:
workflow:frontmatter key (and/orworkflowClass/subagentsfields incommands.yaml) to the command spec under.agentkit/spec/and the generator templates under.agentkit/templates/.generated_by: 'retort'/last_model: 'sync-engine'; hand-edits to.claude/commands/*.mdare clobbered bypnpm retort:sync, so this must live in the spec/templates + schema).pnpm retort:syncand confirm the new frontmatter appears on/review,/project-review,/check,/securitywithout 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-onlyExploreagent type as a tool-layer guardrail.