fix(workflows): centralize path constants and add init-options.json fallback for auto-detect#2
Merged
markuswondrak merged 23 commits intoMay 3, 2026
Conversation
* fix: migrate extension commands on integration switch When switching integrations (e.g. kimi → opencode), extension commands were not re-registered for the new agent, leaving the new agent without extension support and orphaning files in the old agent's directory. Changes: - Add ExtensionManager.unregister_agent_artifacts() to clean up old agent extension files and registry entries during switch - Add ExtensionManager.register_enabled_extensions_for_agent() to re-register all enabled extensions for the new agent - Wire both into integration_switch() after uninstall/install phases - Handle skills mode (Copilot --skills) correctly - Add tests for kimi→opencode→claude migration, Copilot skills mode, and disabled extension handling Fixes extension commands not appearing after integration switch. * Update src/specify_cli/extensions.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…low (github#2412) * feat(extensions): add Spec2Cloud extension for Azure deployment workflow Co-authored-by: Copilot <copilot@github.com> * Update extensions/catalog.community.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update extensions/catalog.community.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat(extensions): update Spec2Cloud extension details and remove duplicate entry Co-authored-by: Copilot <copilot@github.com> * fix(extensions): correct formatting of updated_at timestamp * fix(extensions): update Spec2Cloud extension version and timestamps --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Your Name <your@email.example>
Co-authored-by: Your Name <your@email.example>
Co-authored-by: Your Name <your@email.example>
Co-authored-by: Your Name <your@email.example>
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 23.0.0 to 23.1.0. - [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases) - [Commits](DavidAnson/markdownlint-cli2-action@ce4853d...6b51ade) --- updated-dependencies: - dependency-name: DavidAnson/markdownlint-cli2-action dependency-version: 23.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: bump version to 0.8.4 * chore: begin 0.8.5.dev0 development --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
… auto-detect integration Agent-Logs-Url: https://github.com/markuswondrak/spec-kit/sessions/54bfb375-ba13-4531-b9b0-4140ea6b0edc Co-authored-by: markuswondrak <245696895+markuswondrak@users.noreply.github.com>
…ub#2389) * support controlled multi-install integrations * fix: harden multi-install integration state * refactor: isolate integration runtime helpers * fix: address copilot review feedback * fix: address follow-up copilot feedback * fix: tighten integration switch semantics * fix: address final copilot review feedback * fix: harden integration manifest read errors * fix: refuse symlinked shared infra paths * test: filter expected self-test preset warning * test: address copilot review nits * refactor: centralize safe shared infra writes * fix: use no-follow writes for shared infra * fix: keep default integration atomic on template refresh * fix: harden shared infra error paths * fix: preflight shared infra and future state schemas * fix: support nested shared scripts during preflight * test: tolerate wrapped schema error output * fix: use safe default mode for shared text writes * fix: use posix paths in shared skip output * fix: share project guard for integration use * fix: centralize spec-kit project guards * fix: use posix project paths in cli output * fix: harden shared manifest and upgrade refresh
Copilot created this pull request from a session on behalf of
markuswondrak
May 1, 2026 16:55
View session
…github#2429) * chore: update DyanGalih extensions to latest versions * chore: update catalog root timestamp to current
markuswondrak
approved these changes
May 1, 2026
markuswondrak
changed the base branch from
main
to
fix/workflow-integration-auto-detect
May 1, 2026 18:02
…2165) (github#2432) Add a non-blocking Panel notice during `specify init` when the git extension auto-enables, informing users that starting in v0.10.0 this will require explicit opt-in via `specify extension add git`. - src/specify_cli/__init__.py: track successful git extension install and display yellow "Notice: Git Default Changing" panel - tests/integrations/test_cli.py: integration test validating notice content (v0.10.0 timeline, opt-in messaging, migration command) - docs/reference/core.md: user-facing NOTE about the upcoming change Closes github#2165
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extension ID: token-analyzer Version: 0.1.0 Author: Chris Roberts | coderandhiker Description: Captures, analyzes, and compares token consumption across SDD workflows Repository: https://github.com/coderandhiker/spec-kit-token-analyzer Co-authored-by: Chris Roberts <chris@Chriss-MacBook-Pro.local>
Use SPECIFY_DIR-derived constants for integration.json and init-options.json. Co-authored-by: Cursor <cursoragent@cursor.com>
Sync fork branch with latest changes from the original repository. Co-authored-by: Cursor <cursoragent@cursor.com>
…b#2292) * fix: honor template overrides for tasks-template (github#2278) - Add scripts/bash/setup-tasks.sh mirroring setup-plan.sh pattern - Add scripts/powershell/setup-tasks.ps1 mirroring setup-plan.ps1 pattern - Update tasks.md frontmatter to use dedicated setup-tasks scripts - Resolve tasks template via override stack and emit path as TASKS_TEMPLATE in JSON output - Reference resolved TASKS_TEMPLATE path in generate step instead of hardcoded path * fix: remove stray EOF tokens from setup-tasks scripts * fix: improve error messages for unresolved tasks-template * test: update file inventory tests to include setup-tasks scripts * fix: use Console::Error.WriteLine instead of Write-Error in setup-tasks.ps1 * fix: write prerequisite error messages to stderr in setup-tasks.ps1 * fix: validate tasks template is a file and normalize path in setup-tasks.ps1 * fix: improve tasks-template error message to mention full override stack * test: add setup-tasks.sh to TestCopilotSkillsMode file inventory * fix: skip feature-branch validation when feature.json pins FEATURE_DIR * fix: correct override path in tasks-template error messages * test: add integration tests for setup-tasks template resolution and branch validation * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: correct fixture paths and add spec.md prerequisite checks * fix: use correct .registry schema in preset priority test * fix: remove stale aaa-preset block and duplicate comment in preset priority test * fix: align preset directory names with registry IDs in priority test --------- Co-authored-by: Nimraakram22 <nimra.akram123451@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
markuswondrak
marked this pull request as ready for review
May 3, 2026 06:49
added 2 commits
May 3, 2026 08:57
markuswondrak
merged commit May 3, 2026
1b1031a
into
fix/workflow-integration-auto-detect
8 checks passed
markuswondrak
pushed a commit
that referenced
this pull request
Jul 17, 2026
* feat(workflows): expose workflow source directory to steps (github#3467) Propagate WorkflowDefinition.source_path to steps via {{ context.workflow_dir }} in template expressions and SPECKIT_WORKFLOW_DIR env var for shell steps. The original source directory is persisted in state.json so resume restores the correct value instead of the run-directory copy path. Closes github#3467 Assisted-By: 🤖 Claude Code * fix: apply bot review suggestions (#2) Applied fixes from bot review comments: - Comment #3563319058: prevent stale SPECKIT_WORKFLOW_DIR leak from parent env - Comment #3563319094: use cross-platform Python one-liner instead of printenv - Comment #3563319103: add monkeypatch.delenv for deterministic env var test - Comment #3563319116: same env leak fix as #3563319058 Assisted-By: 🤖 Claude Code * fix: use YAML single-quotes and forward-slash paths for Windows CI (#2) sys.executable on Windows returns backslash paths (D:\a\...) which YAML double-quoted strings interpret as escape sequences. Switch to single-quoted YAML strings and normalize paths with replace("\\", "/"). Assisted-By: 🤖 Claude Code * fix: resolve workflow_dir to absolute path and add installed-by-ID test (github#3469) Applied fixes from bot review comments: - Comment #3563382853: resolve source_path before taking parent to ensure absolute paths - Comment #3563382864: add test for installed-by-ID workflow_dir semantics Assisted-By: 🤖 Claude Code * docs: document context.workflow_dir and SPECKIT_WORKFLOW_DIR Add reference documentation for the new workflow_dir runtime value in both workflows/README.md and docs/reference/workflows.md so workflow authors can discover the feature and its semantics. Assisted-By: 🤖 Claude Code * fix: clarify installed workflow_dir is an absolute path (github#3469) The documentation for context.workflow_dir described the installed-by-ID case as ".specify/workflows/<id>/" which appears relative, contradicting the "resolved absolute path" semantics. Clarified that it is the absolute path to the installation directory. Assisted-By: 🤖 Claude Code * fix: apply bot review suggestions (github#3469) Applied fixes from bot review comments: - Comment #3580005128: Quote sys.executable in shell step env var test - Comment #3580005174: Quote sys.executable in no-env-var test Assisted-By: 🤖 Claude Code * fix: apply bot review suggestions (github#3469) Applied fixes from bot review comments: - Comment #3587146944: Quote interpolated workflow_dir path in example Assisted-By: 🤖 Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the two unresolved review findings from github/spec-kit#2408.
Changes
Finding r3173403182 — centralize
_INTEGRATION_JSONconstant_INTEGRATION_JSONinengine.pywas a duplicate ofINTEGRATION_JSONin__init__.py, risking string drift. Fixed by creating a new side-effect-freesrc/specify_cli/paths.pymodule that both files now import from.Finding r3173403151 — secondary fallback to
init-options.json_load_project_integration()previously only consulted.specify/integration.json. Older projects or partially migrated state (whereintegration.jsonis absent butinit-options.jsonexists) incorrectly fell back to"copilot". Fixed by adding a secondary lookup ininit-options.json(checkingintegrationthenaikeys) before the final"copilot"fallback.Files changed
src/specify_cli/paths.py(new) —INTEGRATION_JSONandINIT_OPTIONS_FILEconstants; dependency-freesrc/specify_cli/__init__.py— importsINTEGRATION_JSONandINIT_OPTIONS_FILEfrompaths.pyinstead of defining them locallysrc/specify_cli/workflows/engine.pyspecify_cli.paths_resolve_default()and_load_project_integration()methods for auto-detection_resolve_inputs()calls_resolve_default()for defaults; post-loop check resolves explicitintegration=autoinputs too_load_project_integration()readsintegration.jsonfirst, falls back toinit-options.json, then"copilot"workflows/speckit/workflow.yml— default changed"copilot"→"auto", prompt updated to includeopencode/auto,requires.integrations.anystatic list removedtests/test_workflows.py—TestIntegrationAutoDetect(10 tests) covering all resolution paths