Skip to content

fix(workflows): centralize path constants and add init-options.json fallback for auto-detect#2

Merged
markuswondrak merged 23 commits into
fix/workflow-integration-auto-detectfrom
copilot/fix-findling-issues
May 3, 2026
Merged

fix(workflows): centralize path constants and add init-options.json fallback for auto-detect#2
markuswondrak merged 23 commits into
fix/workflow-integration-auto-detectfrom
copilot/fix-findling-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented May 1, 2026

Addresses the two unresolved review findings from github/spec-kit#2408.

Changes

Finding r3173403182 — centralize _INTEGRATION_JSON constant

_INTEGRATION_JSON in engine.py was a duplicate of INTEGRATION_JSON in __init__.py, risking string drift. Fixed by creating a new side-effect-free src/specify_cli/paths.py module 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 (where integration.json is absent but init-options.json exists) incorrectly fell back to "copilot". Fixed by adding a secondary lookup in init-options.json (checking integration then ai keys) before the final "copilot" fallback.

Files changed

  • src/specify_cli/paths.py (new)INTEGRATION_JSON and INIT_OPTIONS_FILE constants; dependency-free
  • src/specify_cli/__init__.py — imports INTEGRATION_JSON and INIT_OPTIONS_FILE from paths.py instead of defining them locally
  • src/specify_cli/workflows/engine.py
    • Imports path constants from specify_cli.paths
    • Adds _resolve_default() and _load_project_integration() methods for auto-detection
    • _resolve_inputs() calls _resolve_default() for defaults; post-loop check resolves explicit integration=auto inputs too
    • _load_project_integration() reads integration.json first, falls back to init-options.json, then "copilot"
  • workflows/speckit/workflow.yml — default changed "copilot""auto", prompt updated to include opencode/auto, requires.integrations.any static list removed
  • tests/test_workflows.pyTestIntegrationAutoDetect (10 tests) covering all resolution paths

cyliu0 and others added 11 commits May 1, 2026 07:41
* 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
…github#2429)

* chore: update DyanGalih extensions to latest versions

* chore: update catalog root timestamp to current
@markuswondrak markuswondrak changed the base branch from main to fix/workflow-integration-auto-detect May 1, 2026 18:02
mnriem and others added 7 commits May 1, 2026 13:06
…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 markuswondrak marked this pull request as ready for review May 3, 2026 06:49
@markuswondrak markuswondrak merged commit 1b1031a into fix/workflow-integration-auto-detect May 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.