feat(workflows): support file-backed inputs#2420
feat(workflows): support file-backed inputs#2420Adr1an04 wants to merge 27 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds generic CLI support for providing workflow inputs from files (single values via key=@path and bulk values via --input-file JSON), keeping existing inline --input key=value behavior and defining clear precedence/validation at the CLI boundary.
Changes:
- Added
_parse_workflow_inputs(plus helpers) to normalize--inputand--input-fileinto the workflow engine input dict. - Extended
workflow runCLI options with--input-fileand--input key=@pathsemantics (CLI values override file values). - Added regression tests for parsing/precedence/error cases and updated workflow CLI documentation examples.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Implements file-backed input parsing helpers and wires them into workflow run via new CLI options. |
tests/test_workflows.py |
Adds targeted tests covering @file inputs, --input-file JSON loading, precedence, and failure modes. |
docs/reference/workflows.md |
Updates CLI reference docs with the new options and usage examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mnriem I handled Copilots feedback and made sure to take into account your message in the issue. Let me know if you need me to edit anything! :D |
There was a problem hiding this comment.
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
5939eab to
37d6d44
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
| inputs[key] = value | ||
|
|
||
| return inputs | ||
|
|
||
|
|
| if input_file is not None: | ||
| inputs.update(_load_workflow_input_file(input_file)) |
…ithub#2445) * chore: update security-review extension to v1.4.2 * chore: update memory-md description and catalog updated_at
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if value.startswith("@"): | ||
| file_ref = value[1:].strip() | ||
| if file_ref: | ||
| candidate_path = _resolve_workflow_cli_path(file_ref) | ||
| if candidate_path.exists() and candidate_path.is_file(): | ||
| _, value = _read_workflow_cli_file( | ||
| file_ref, f"input {key!r}" | ||
| ) |
| for key, value in _load_workflow_input_file(input_file).items(): | ||
| inputs[key] = _normalize_workflow_cli_scalar( | ||
| value, | ||
| input_definitions.get(key), | ||
| ) |
| result = CliRunner().invoke( | ||
| app, | ||
| [ | ||
| "workflow", | ||
| "run", | ||
| "speckit", | ||
| "--input-file", | ||
| "payload.json", | ||
| "--input", | ||
| "scope=full", | ||
| ], | ||
| ) |
…ithub#2413) * feat(presets): add Spec2Cloud preset for Azure deployment workflow Co-authored-by: Copilot <copilot@github.com> * feat(presets): add Spec2Cloud preset details to community catalog * fix(presets): update Spec2Cloud URL to point to the correct GitHub repository * feat(presets): update Spec2Cloud entry with created_at and updated_at timestamps * feat(presets): update Spec2Cloud version to 1.1.0 and adjust timestamps * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: update spec2cloud preset details and resolve merge conflicts * fix: reorder Spec2Cloud entry in community presets for consistency --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* chore: bump version to 0.8.5 * chore: begin 0.8.6.dev0 development --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Please address Copilot feedback. If not applicable, please explain why |
Co-authored-by: formin <formin@sds.co.kr>
* feat: add Architecture Guard to community catalog - Add architecture-guard v1.4.0 extension entry to catalog - Add entry to README community extensions table - Includes built-in Laravel-specific governance rules * chore: update catalog timestamp to 2026-05-05 * fix: address PR feedback - Add 'governance' category to README legend (used by Architecture Guard) - Update architecture-guard timestamps to 2026-05-05 (submission date) - Align with published extension behavior (Laravel support now built-in) * chore: update Architecture Guard category to process - Changed from 'governance' to 'process' (official category) - Aligns with schema in EXTENSION-PUBLISHING-GUIDE.md - Removed 'governance' from category legend (not an official category) * chore: update timestamps to actual UTC datetime - Top-level updated_at: 2026-05-05T07:26:00Z - Entry created_at/updated_at: 2026-05-05T07:26:00Z - Replaces placeholder 00:00:00Z with actual submission time
* fix: validate URL scheme in build_github_request * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * test: add missing hostname validation test for build_github_request * fix: update docstring and fix import grouping per Copilot feedback * fix: sort imports and simplify url validation in build_github_request --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Simplify the community catalog submission flow to use issue templates with manual maintainer review (no automation scripts or workflows). - Add explicit CODEOWNERS entries for catalog.community.json files so submissions are automatically assigned to a maintainer for review - Improve preset submission template: - Add 'Required Extensions' optional field - Make 'Templates Provided' optional (supports command-only presets) - Add 'Number of Scripts' optional field The existing extension and preset issue templates already collect all required catalog metadata. Maintainers review submissions and manually update the catalog JSON files. Closes github#2400
…ce during implementation (github#2460) * Initial plan * fix implement command to load constitution context Agent-Logs-Url: https://github.com/github/spec-kit/sessions/05663d9d-149b-4c13-a22d-2552b3fa619c Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* chore: bump version to 0.8.6 * chore: begin 0.8.7.dev0 development --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* feat(catalog): add Cost Tracker (cost) community extension Adds a new entry for spec-kit-cost — track real LLM dollar cost across SDD workflows with per-feature budgets, per-integration comparison, and finance-ready exports. Repo: https://github.com/Quratulain-bilal/spec-kit-cost Release: v1.0.0 * docs(catalog): add Cost Tracker README row, bump updated_at Address Copilot review feedback: - Add Cost Tracker row to README community extensions table - Bump top-level updated_at per EXTENSION-PUBLISHING-GUIDE.md * fix(catalog): address Copilot feedback on cost extension entry - Move cost entry after confluence so the c* block is alphabetized - Bump top-level updated_at to 2026-05-05 per EXTENSION-PUBLISHING-GUIDE - Use documented 'visibility' category in README (not 'analytics'), matching Token Consumption Analyzer's classification - Replace 'analytics' tag with 'visibility' in catalog tags for consistency * fix(catalog): bump top-level updated_at for cost entry addition Address Copilot feedback: the file-level updated_at must be bumped on every catalog change per EXTENSION-PUBLISHING-GUIDE.md:204-205. --------- Co-authored-by: Quratulain-bilal <quratulain.bilal@users.noreply.github.com>
…github#2462) * fix(forge): use hyphen notation for command refs in Forge integration - Add invoke_separator = "-" class attribute to ForgeIntegration so effective_invoke_separator() returns "-" for shared-template installs - Add "invoke_separator": "-" to ForgeIntegration.registrar_config so agents.py CommandRegistrar can resolve refs with the correct separator - Pass invoke_separator to process_template() in ForgeIntegration.setup() so all .forge/commands/*.md bodies use /speckit-foo notation - Replace literal /speckit.specify with __SPECKIT_COMMAND_SPECIFY__ in extensions/git/commands/speckit.git.feature.md so every agent resolves the reference through its own separator - Apply resolve_command_refs re.sub in agents.py register_commands() after argument-placeholder substitution so extension commands registered for Forge get /speckit-foo refs; all other agents continue to get /speckit.foo Fixes ZSH compatibility: dot-notation command invocations (/speckit.specify) are misinterpreted by ZSH as file-path operations; hyphen notation (/speckit-specify) works correctly in all shells. * fix(agents): propagate invoke_separator from integration class into AGENT_CONFIGS Skills-based agents (claude, codex, kimi, …) inherit invoke_separator="-" from SkillsIntegration but do not repeat it in their registrar_config dicts. _build_agent_configs() was copying registrar_config verbatim, so register_commands() fell back to "." when resolving __SPECKIT_COMMAND_*__ tokens for those agents — emitting /speckit.specify instead of the correct /speckit-specify for extension commands like speckit.git.feature. Fix: after copying registrar_config, inject invoke_separator from the integration's class attribute when it is not already declared explicitly. This makes the integration class the single source of truth for all agents, without requiring each SkillsIntegration subclass to duplicate the field. Also replace the inline re.sub in register_commands() with a call to IntegrationBase.resolve_command_refs() (deferred import to avoid the existing circular dependency) so token-resolution logic is not duplicated. Adds two tests in test_agent_config_consistency.py: - test_skills_agents_have_hyphen_invoke_separator_in_agent_configs: asserts every /SKILL.md agent has invoke_separator="-" in AGENT_CONFIGS. - test_skills_agent_command_token_resolves_with_hyphen: end-to-end check via CommandRegistrar that the git extension's speckit.git.feature command is installed for Claude with /speckit-specify (not /speckit.specify). Addresses review comment on PR github#2462.
…r1an04/spec-kit into feat/workflow-input-file-refs
Refs #2405
Summary
This PR adds support for passing workflow inputs from files.
You can still pass inputs inline with repeated
--input key=valueflags. For longer values, you can now usekey=@path, and for multiple values you can use a JSON file with--input-file.This is handled generically for workflow inputs/parameters, not just for
spec.What changed
--input key=@pathfor any workflow input key.--input-file payload.jsonto load multiple inputs from a JSON object.--inputvalues override values loaded from--input-file.Examples
Notes
File references are not
spec-specific. They work for any workflow input key.Values starting with
@are only read from a file when that file exists. This keeps literal values like@aliceor@working as normal strings.--input-filevalues are loaded first, then direct--inputvalues are applied after that. This lets command-line values override the JSON file.What did not change
WorkflowEnginebehavior.--input-fileonly accepts a JSON object.--input key=@pathvalues are read as UTF-8 text.Testing
I ran focused workflow input regression tests:
uv run python -m pytest tests/test_workflows.py -k WorkflowCliInputs -v # 12 passed, 126 deselected in 0.15sI also ran the full workflow test file:
uv run python -m pytest tests/test_workflows.py -v # 138 passed in 0.30sI used the existing agent config consistency test:
uv run python -m pytest tests/test_agent_config_consistency.py -q # 24 passed in 0.13sI ran the full test suite:
uv run python -m pytest -q # 1833 passed, 29 skipped, 18 warnings in 20.25sCLI-level validation
I tested the workflow CLI directly in a temporary Spec Kit project.
Covered cases:
--input key=@pathreads an existing UTF-8 text file.promptanddescription, not onlyspec.--input key=valuevalues still work.@aliceand bare@stay unchanged.@pathvalues stay literal.--input-file payload.jsonloads multiple inputs from a JSON object.--inputvalues override values loaded from--input-file.key=@path.--input-fileexits cleanly with code 1.Smoke test output:
I also checked the command help and confirmed the new CLI options are exposed:
AI assistance note
I used ChatGPT to help think through edge cases and wording. I wrote, reviewed, and tested the code locally before opening this PR.