feat(engine): workflow-adopt + workflow-sync — template-based workflow lifecycle#120
feat(engine): workflow-adopt + workflow-sync — template-based workflow lifecycle#120iamcxa wants to merge 4 commits into
Conversation
…aml from installed plugins Scans installed plugins for workflow-template.yaml files, presents available templates to captain, then invokes spacedock:commission in batch mode with the template's pre-configured stages. Each workflow plugin ships its own template; the engine handles discovery and routing. Zero coupling to any specific workflow.
adopt: discovers workflow-template.yaml from installed plugins, routes to commission in batch mode. Args: [template-name] [--dir path] sync: diffs project README vs plugin template, reports drift, applies captain-approved updates. Args: [workflow-dir] Pair replaces the old setup skill. adopt handles first-time bootstrap, sync handles ongoing template evolution. Neither is tied to engine version upgrades (that's refit's job).
…tion find -exec grep exits with the last grep's exit code, which is 1 when the last file doesn't match. In projects with node_modules/ (131+ README.md files), this silently misses the actual workflow README. Exclude vendored dirs to fix false-negative detection. Found via smoke test in spacedock-ui project.
Clearer naming: these are workflow operations, distinct from engine operations (commission, refit). Updated frontmatter name fields and cross-references.
Reference: ship-flow — a working installable workflow built on this PR
What it is: A ship-focused pipeline where captain SHARPs once, then agents autonomously plan → execute → verify → ship. One human gate, rest is autonomous. Stages: Key files:
How it works with this PR: # Install the plugin
claude plugin marketplace add https://github.com/iamcxa/spacedock-ui.git
claude plugin install ship-flow@spacedock-ui --scope project
# Bootstrap a workflow from the template (uses workflow-adopt from this PR)
/spacedock:workflow-adopt ship-flow
# Start shipping
/ship-flow:ship-sharp my-feature
# → agents take over from hereBattle-tested: 10+ entities shipped through this pipeline, including entity 009 (War Room redesign) and entity 011 (visual polish) — full autonomous plan→execute→verify→ship with real code changes. |
|
Re-audited this PR's scope per your feedback on other PRs in this batch:
Ready for review when you get a chance. #134 and #135 have now been rebased independently (each containing only their claimed scope). #130 still pending a separate scope decision (your suggestion to move it to its own skill). |
|
not sure if this is still needed. you can ask commission to reference another workflow directly |
Problem
When a workflow plugin (e.g., ship-flow, spacedock-workflow) ships a
workflow-template.yamlwith pre-configured stages, there's no engine-level mechanism to:Users must manually run
/spacedock:commissionand re-enter all stage definitions, or hand-edit the README when templates update.Solution: Two new engine skills
workflow-adopt— First-time bootstrap from plugin template~/.claude/plugins/cacheforworkflow-template.yamlfilesspacedock:commissionin batch mode with template's stages, entity type, gates, and skill bindingsworkflow-sync— Template drift detection + updateskill:namespaces in stagesworkflow-template.yamlDesign principles
workflow-template.yamlfrom any installed plugin. No coupling to specific workflow plugins.commission+refitbut for workflow template evolution, not engine version upgrades.Bug fix included
findcommand for workflow detection excludesnode_modules/,.git/,vendor/to prevent false negatives in projects with vendored directories (found via smoke test in a Next.js project with 131+ README.md files in node_modules).Files
skills/workflow-adopt/SKILL.md— 75 linesskills/workflow-sync/SKILL.md— 100 linesDepends on
#119 (stage
skill:binding) — workflow-adopt passesskill:fields to commission, which needs #119 to write them correctly into the README.