[Feature]: Compose workflows — run an installed workflow as a step
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Start in the Specify CLI initialization and commands component, locating workflow step registration and the engine.resume entry point. Trace how installed workflow IDs, child runs, outputs, and ancestry are represented; done means all listed acceptance criteria are covered by documentation and tests, including re-entry, cycle rejection, validation, and failure propagation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem Statement
Workflows can orchestrate commands but not other workflows. There is no workflow step type and overlays only edit a single base workflow, so a meta-workflow that routes to different workflows must copy their steps or shell out to specify workflow run opaquely.
Proposed Solution
Add a workflow step type that runs an already-installed workflow by ID:
- id: route
type: if
condition: "{{ steps.triage.output.stdout | contains('bug') }}"
then:
- id: run-bug
type: workflow
workflow: bug # installed workflow id
input: { spec: "{{ inputs.spec }}" }
else:
- id: run-speckit
type: workflow
workflow: speckit # installed workflow id
input: { spec: "{{ inputs.spec }}" }
Installed IDs only. The step starts the sub-workflow as its own run and exposes typed output:
{ "status": ..., "run_id": ..., "steps": {<child step id>: <child step_result>} }
downstream as {{ steps.run-bug.output.steps.<child_id>.output... }} (scoped under the parent step id, so no collision with other top-level step results).
Re-entry: the child run_id is deterministic — sanitize(f"{parent_run_id}-{effective_step_id}") (the effective id already carries loop/fan-out iteration). On re-execution the step looks up that run: paused/failed → engine.resume(child_run_id); terminal → reuse the persisted result; absent → start it. A sub-workflow that pauses at a gate therefore resumes from its own top-level state, with no duplicate runs even if the parent crashed before recording output.
Cycle safety: each run carries a path-based workflow_ancestry; the step refuses a child already on the path (or exceeding a max depth) and passes ancestry + [current_id] down — diamonds stay legal, only true cycles are blocked. Checked at runtime since target IDs may be expressions.
Alternatives Considered
- Shell step calling
specify workflow run --json— opaque, loses typed output, can't re-enter a paused sub-run. - Copying steps / overlays — duplicates logic and drifts.
- Generic nested-resume via the top-level step index — engine-wide redesign; sidestepped by the deterministic run-id handoff.
Component
Specify CLI (initialization, commands)
AI Agent
Not applicable
Use Cases
- Triage/routing meta-workflow dispatching to existing
bugvs.speckitworkflows. - Reusing a shared sub-workflow across several parent workflows.
Acceptance Criteria
-
workflowstep type registered, documented, and tested. - Resolves installed IDs only; rejects unknown, path-like, and disabled workflows.
-
input:supports expressions and validates against the target schema. - Output
{status, run_id, steps}exposed and readable downstream. - Deterministic child run_id; paused/failed child resumed via
engine.resume; terminal child reused; no duplicate runs after a crash. - Path-based cycle detection plus max-depth backstop.
- Failed/aborted child surfaces as a failed/aborted parent step.
Additional Context
Follow-up to discussion #4647 (maintainer approved).
AI Disclosure
Created with opencode (model: deepseek-v4.1-flash, human-supervised) on behalf of @markuswondrak, based on the AI-assisted draft in discussion #4647.
- Vorherrschende Sprache
- Python
- Sterne
- 138k
- Forks
- 12.4k
- Ø Merge
- 3 T. 2 Std.
- Gemergte PRs (30 T.)
- 169
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/spec-kit
-
enhancement needs-triage triage-can-wait
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
preset-submission triage-must-have validation-passed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
extension-submission triage-must-have validation-passed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
extension-submission triage-can-wait validation-passed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
[Feature]: 给 slug 添加默认值 Offenenhancement needs-triage triage-can-wait
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Alle Issues in github/spec-kit
Ähnliche Issues
-
agent-ready documentation needs-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
instance instance add
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
searxng/searx-instances#939 · 1 Kommentar ·
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100