Problem Statement
Spec Kit prints Run ID: <8-char hex> at the end of
specify workflow run, but that identifier isn't exposed to
workflow YAMLs as a template variable. There is no
{{ context.run_id }} (or similar) for type: shell /
type: command steps to reference.
- id: dump-context
type: shell
run: 'echo "RUN_ID={{ context.run_id }}"'
{{ context.run_id }} resolves empty / errors today.
Proposed Solution
Expose the run id as a template variable. Three shapes:
- A.
{{ context.run_id }} — consistent with existing
context.* / inputs.* / steps.X.output.*.
- B.
{{ runtime.run_id }} — separate namespace for
machine-managed values.
- C.
SPECIFY_RUN_ID env var on the spawned subprocess.
A is the most discoverable.
Component
Other
AI Agent (if applicable)
All agents
Use Cases
- Telemetry / observability cross-join — stamp logs and events
with the Spec Kit run id so external systems can join workflow
runs to downstream artifacts.
- Per-run scratch / isolation — workflows running interactive
operator commands want per-run storage to isolate concurrent
runs.
- Run-id in artifact metadata — stable join key from artifact
back to the producing run.
Acceptance Criteria
Additional Context
Implementation should be small — threading the existing run id into
the template resolver's context map.
AI disclosure: drafted with Claude Opus, human-reviewed.
Problem Statement
Spec Kit prints
Run ID: <8-char hex>at the end ofspecify workflow run, but that identifier isn't exposed toworkflow YAMLs as a template variable. There is no
{{ context.run_id }}(or similar) fortype: shell/type: commandsteps to reference.{{ context.run_id }}resolves empty / errors today.Proposed Solution
Expose the run id as a template variable. Three shapes:
{{ context.run_id }}— consistent with existingcontext.*/inputs.*/steps.X.output.*.{{ runtime.run_id }}— separate namespace formachine-managed values.
SPECIFY_RUN_IDenv var on the spawned subprocess.A is the most discoverable.
Component
Other
AI Agent (if applicable)
All agents
Use Cases
with the Spec Kit run id so external systems can join workflow
runs to downstream artifacts.
operator commands want per-run storage to isolate concurrent
runs.
back to the producing run.
Acceptance Criteria
prints as
Run ID:.— empty string or sentinel, not an error.
unchanged.
type: shellrun:,type: commandinput.args, and switch expressions.Additional Context
Implementation should be small — threading the existing run id into
the template resolver's context map.
AI disclosure: drafted with Claude Opus, human-reviewed.