Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Feature]: capture mode for command and prompt workflow steps

Aperta
#4,613 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli, tooling

Direzione di ricerca

Start with src/specify_cli/workflows/steps/command/init.py and the existing ShellStep capture pattern, then inspect prompt/init.py, validators.py, and IntegrationBase.dispatch_command(). Add regression coverage in tests/test_workflows.py for opt-in command and prompt capture, validation, and timeout behavior; done means captured stdout/stderr reach downstream step outputs while default streaming remains unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature-assess triage-nice-to-have

Problem

Workflow command and prompt steps always stream output to the terminal. The stdout and stderr fields in the step output dict are always empty strings, making them inaccessible to downstream steps via {{ steps.<id>.output.stdout }}.

This limits workflow authors who need to:

  • Parse AI agent output and branch on its content
  • Pipe command output into a later step as structured data
  • Conditionally act on specific output patterns (e.g. exit messages, generated file paths)

The command step docstring (line 26) notes this as a planned enhancement:

Full stdout/stderr capture is a planned enhancement.

Proposed Solution

Add an opt-in capture: true field to command and prompt step configs. When set, dispatch uses capture_output=True so stdout and stderr are returned in the step output dict and accessible to downstream steps.

# Before (streaming, stdout/stderr always empty):
- id: plan
  type: command
  config:
    command: speckit.plan
    integration: claude

# After (capture mode, stdout/stderr available):
- id: plan
  type: command
  config:
    command: speckit.plan
    integration: claude
    capture: true
    timeout: 300

Downstream steps can then reference:

- id: parse
  type: shell
  config:
    command: "echo '{{ steps.plan.output.stdout | from_json }}'"

Design Notes

  • Backward compatible: capture defaults to false; existing workflows are unaffected
  • Follows existing pattern: ShellStep already captures output with capture_output=True and supports output_format: json
  • Timeout support: A timeout field (seconds, default 600) prevents hung commands from blocking the workflow, consistent with dispatch_command() default
  • Implementation: Requires forwarding stream=not capture to IntegrationBase.dispatch_command() which already supports both modes

Affected Files

  • src/specify_cli/workflows/steps/command/__init__.py - config schema, dispatch call, output assembly
  • src/specify_cli/workflows/steps/prompt/__init__.py - same pattern for prompt steps
  • src/specify_cli/workflows/validators.py - capture (bool) and timeout (int) validation
  • tests/test_workflows.py - capture mode regression tests

Questions

  1. Does this direction align with your roadmap for the workflow engine?
  2. Should capture mode also apply to the prompt step, or only command steps?
  3. Any preferences on the field name (capture vs capture_output vs something else)?

Happy to implement if this is something you'd like to move forward with.

Lingua principale
Python
Stelle
138k
Fork
12.4k
Merge medio
3g 4h
PR unite (30g)
154

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/spec-kit

Tutte le issue di github/spec-kit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.