Skip to content

[Workflow Step]: Add decision step #4868

Description

@markuswondrak

Step Type ID

decision

Step Type Name

Decision

Version

0.9.0

Description

Poses bounded choice, score, and noul questions to a decision backend and returns typed answers (with native probabilities and score legends) that workflows branch on directly, with no free-form chat or JSON parsing. Using built-in Jev and Laya backends.

Author

Markus Wondrak

Repository URL

https://github.com/markuswondrak/spec-kit-decision-step

Download URL

https://github.com/markuswondrak/spec-kit-decision-step/releases/download/v0.9.0/decision-0.9.0.zip

step.yml URL

https://raw.githubusercontent.com/markuswondrak/spec-kit-decision-step/v0.9.0/step.yml

init.py URL

https://raw.githubusercontent.com/markuswondrak/spec-kit-decision-step/v0.9.0/__init__.py

Extra File URLs

{
  "backends.py": "https://raw.githubusercontent.com/markuswondrak/spec-kit-decision-step/v0.9.0/backends.py",
  "config.py": "https://raw.githubusercontent.com/markuswondrak/spec-kit-decision-step/v0.9.0/config.py",
  "defaults.yml": "https://raw.githubusercontent.com/markuswondrak/spec-kit-decision-step/v0.9.0/defaults.yml"
}

Per-file SHA-256 Digests

{
  "step.yml": "f00568ffb1d44b961480c43bb175c2f63e0c8e66fda2780e4cf5530b80222a2e",
  "__init__.py": "5fc65c099e37483d050e8c03e4b205597dc8e78a30611137e167e47762349d99",
  "backends.py": "97e4ea31aaf84dedd5b5bd6039defdd35b6aba39a02ccfe911f5bc45326edb02",
  "config.py": "442529d9b1d1ce6f9bb50d7feba8e2a5ab5b302dcb9e2a1bdd68213c13d255f2",
  "defaults.yml": "849cd30fcee714e2edbf588a4736f27aae2dce2f71268407ffb71cad3a41d03f"
}

License

MIT

Spec Kit Compatibility

=0.11.0

Runtime and Tool Dependencies

  • Python package: PyYAML>=6.0 (satisfied by the Spec Kit host)
  • Host package: specify_cli (provided by Spec Kit >=0.11.0)
  • Optional Python package: laya[onnx] (only for the inprocess backend mode)
  • Environment variable: TYPESAFE_API_KEY, or a configured api_key_env, for the Jev backend
  • Network: outbound HTTPS to the configured decision backend endpoint
  • Otherwise standard library only: json, math, re, copy, pathlib, typing, importlib, os, urllib

Number of Provided Step Types

1

Step Type Provided

DecisionStep — decision

Documentation URL

https://github.com/markuswondrak/spec-kit-decision-step/blob/v0.9.0/README.md

Changelog URL

https://github.com/markuswondrak/spec-kit-decision-step/blob/v0.9.0/CHANGELOG.md

Testing Details

Tested with: Spec Kit 1.1.1 (PyPI specify-cli) here; the step's runtime APIs were previously exercised end-to-end on 0.11.0, 0.13.4, 0.16.5, and 1.0.13.

Positive:

  • specify workflow step add decision --from <download-url> installs the release artifact; workflow step list / info decision show v0.9.0 as Installed with step.yml metadata.
  • The shipped example workflow runs to status: completed with typed choice/score(+legend)/noul answers and matching switch/if matched_case/condition_result; both branch directions verified.
  • --dev authoring loop, --force replace, and workflow step remove verified.

Negative:

  • Invalid configuration returns a failed result with an actionable error (missing backend, bad timeout, unknown question type).
  • Backend transport failures map to BackendError; HTTP 3xx is rejected (no redirect following); API keys are never logged or placed in state/output.

Tests: host-free default suite (7 tests) plus an opt-in --integration suite (41 tests); ruff clean.

Required Attestations

  • The release artifact contains regular, non-symlink step.yml and __init__.py files at the package root or under exactly one top-level directory
  • The catalog ID, step.type_key, and the matching StepBase.type_key are identical and do not collide with a built-in step type
  • The submitted version matches step.version, the download URL identifies that versioned release, and every catalog file URL is version-pinned
  • The SHA-256 mapping covers exactly every file the catalog installer downloads
  • The release artifact installs successfully with specify workflow step add <step-id> --from <download-url>
  • Runtime and tool dependencies, side effects, configuration, outputs, and failure behavior are documented
  • The repository includes the submitted license and complete source for the released package
  • I understand that custom workflow steps execute Python with the user's privileges and that a community catalog listing is not a code audit, endorsement, or support commitment

Additional Context

Release: https://github.com/markuswondrak/spec-kit-decision-step/releases/tag/v0.9.0

Compatibility note: the step runtime works on Spec Kit >=0.11.0 (where custom step loading was introduced), so the field above reads >=0.11.0. The --from / --dev / --force install flags this submission's Download URL depends on require >=1.1.0 (spec-kit #4769); the artifact was installed and tested on 1.1.1.

All catalog file URLs are pinned to tag v0.9.0; the SHA-256 map covers exactly step.yml, init.py, backends.py, config.py, and defaults.yml.

AI Disclosure

AI assistance was used for this submission. Agent/tool: opencode CLI (terminal coding agent). Model: deepseek-v4.1-flash. Mode: human-supervised — the agent proposed and applied changes autonomously under the repository owner's direction and review. Extent: drafting and refactoring step code, docs, tests, release automation, and this submission metadata; the repository owner reviewed and accepted all changes.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-must-haveVerdict: high-value, important work for Spec Kit — do first

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions