Skip to content

Add Zed integration#2780

Open
arrrrny wants to merge 17 commits into
github:mainfrom
arrrrny:feat/2779-zed-integration
Open

Add Zed integration#2780
arrrrny wants to merge 17 commits into
github:mainfrom
arrrrny:feat/2779-zed-integration

Conversation

@arrrrny
Copy link
Copy Markdown

@arrrrny arrrrny commented May 31, 2026

Summary

  • add a built-in zed integration that installs Spec Kit commands as Zed skills under .agents/skills
  • render Zed skill invocations correctly in init next-steps output and hook messages
  • add integration coverage for Zed plus registry/list assertions and docs updates

Testing

  • uv run --extra test python3 -m pytest tests/integrations/test_registry.py tests/integrations/test_integration_subcommand.py::TestIntegrationList::test_list_shows_available_integrations tests/integrations/test_integration_zed.py -q

Closes #2779

@arrrrny arrrrny requested a review from mnriem as a code owner May 31, 2026 08:39
Copilot AI review requested due to automatic review settings May 31, 2026 08:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Zed editor as a new skills-based integration that installs Spec Kit commands as .agents/skills/speckit-<name>/SKILL.md files invokable via Zed's slash-command menu.

Changes:

  • New ZedIntegration class registered in the integrations registry
  • Hook invocation rendering and init-flow handling for zed skill mode
  • Documentation, registry, and integration-test updates including a new test_integration_zed.py

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/specify_cli/integrations/zed/init.py New ZedIntegration (skills-based, .agents/skills, AGENTS.md)
src/specify_cli/integrations/init.py Imports and registers ZedIntegration
src/specify_cli/extensions.py Adds zed_skill_mode branch rendering /skill-name invocations
src/specify_cli/commands/init.py Adds Zed to skill-mode flags, post-init step, and display command logic
docs/reference/integrations.md Adds Zed row to integrations table
docs/index.md Bumps integration count from 30 to 31 and lists Zed
tests/integrations/test_registry.py Adds zed to expected-keys list
tests/integrations/test_integration_subcommand.py Asserts zed appears in list output
tests/integrations/test_integration_zed.py New tests for Zed integration and hook invocation rendering

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/specify_cli/integrations/zed/__init__.py Outdated
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback

@arrrrny
Copy link
Copy Markdown
Author

arrrrny commented Jun 1, 2026

Side note, I have been using it last couple days and it works as expected

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 1

Comment thread docs/index.md Outdated
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Jun 2, 2026

Please address Copilot feedback and the test & lint errors

Copilot AI review requested due to automatic review settings June 2, 2026 23:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Comment thread src/specify_cli/commands/init.py Outdated
Comment thread src/specify_cli/commands/init.py
Comment thread src/specify_cli/commands/init.py Outdated
Comment thread src/specify_cli/extensions.py Outdated
Comment thread src/specify_cli/extensions.py Outdated
Comment thread src/specify_cli/integrations/zed/__init__.py Outdated
- Remove non-actionable --skills flag from ZedIntegration (Zed is always
  skills-based, like Agy)
- Align zed_skill_mode predicate with ai_skills for consistency across
  init output and hook rendering
- Consolidate claude/cursor/zed slash-skill return blocks in
  _render_hook_invocation to reduce duplication
- Override test_options_include_skills_flag for Zed (no --skills flag)
@arrrrny arrrrny requested a review from mnriem June 2, 2026 23:22
@mnriem mnriem requested a review from Copilot June 3, 2026 13:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 1

Comment thread src/specify_cli/integrations/zed/__init__.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 3, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread src/specify_cli/extensions.py Outdated
Comment thread tests/integrations/test_integration_zed.py
- Make zed_skill_mode unconditional in hook rendering (Zed is always
  skills-based, no --skills option)
- Add test_init_persists_ai_skills_for_zed that exercises the actual
  CLI init path and verifies HookExecutor renders /speckit-plan
  without manual init-options manipulation
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Comment thread docs/index.md Outdated
Comment thread docs/index.md Outdated
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 03:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread docs/index.md
Comment thread docs/index.md Outdated
Comment thread tests/integrations/test_integration_zed.py Outdated
arrrrny and others added 2 commits June 4, 2026 07:46
- Update integration count from 31 to 33 in docs/index.md (32 integrations + Generic)
- Make zed_skill_mode unconditional to match extensions.py behavior
- Consolidate slash-skill integrations into a set for consistency
- Move os import to module level in test_integration_zed.py
Copilot AI review requested due to automatic review settings June 4, 2026 04:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread src/specify_cli/commands/init.py Outdated
Comment thread src/specify_cli/extensions.py Outdated
Comment thread src/specify_cli/extensions.py Outdated
- Fix slash-skill integrations: Claude/Cursor require ai_skills=true; Zed/Agy/Devin are always skills
- Allow --ai-skills with --integration (not just --ai) to fix validation error
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Comment thread src/specify_cli/extensions.py Outdated
Comment thread src/specify_cli/commands/init.py
- Add agy_skill_mode and devin_skill_mode variables to fix F841 lint error
- Use all skill mode variables in the slash-skill conditional check
- Update --ai-skills help text to reflect it works with --integration too
Copilot AI review requested due to automatic review settings June 4, 2026 15:37
@arrrrny arrrrny force-pushed the feat/2779-zed-integration branch from 05b7fac to 04d3eb3 Compare June 4, 2026 15:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/specify_cli/extensions.py
Comment thread src/specify_cli/commands/init.py
Comment thread docs/index.md
Comment thread docs/index.md
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Jun 4, 2026

Please address Copilot feedback and resolve conflicts by rebasing on upstream/main

arrrrny added 2 commits June 4, 2026 22:15
Trae is a SkillsIntegration like Zed/Agy/Devin, so it should also be treated
as always-skills-based in hook invocation rendering.
AgyIntegration is a SkillsIntegration subclass with no --skills option,
so it should be treated as always skills-based (like Zed, Devin, Trae).
This aligns init.py skill mode detection with extensions.py hook rendering.
Copilot AI review requested due to automatic review settings June 4, 2026 19:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Comment thread src/specify_cli/commands/init.py Outdated
Comment thread src/specify_cli/extensions.py
Comment thread src/specify_cli/extensions.py Outdated
Comment thread docs/index.md
Comment thread docs/index.md
Comment thread src/specify_cli/extensions.py Outdated
Comment thread src/specify_cli/extensions.py Outdated
Comment thread tests/integrations/test_integration_zed.py Outdated
arrrrny added 2 commits June 4, 2026 22:55
…sets

Addressed Copilot review comments:

- Restored _is_skills_integration guard on agy_skill_mode in init.py
  to be defensive about runtime integration type.
- Refactored _render_hook_invocation() in extensions.py to use
  always_slash/conditional_slash frozensets instead of individual
  per-agent booleans, eliminating unused variables (F841) and making
  it harder for conditions to drift between integrations.
- Centralized slash-skill determination so adding a new unconditional
  slash-skill integration is a one-key addition.
Resolved conflicts in extensions.py:
- Adopted upstream/main's is_ai_skills_enabled(init_options) helper
- Combined with always_slash/conditional_slash frozenset approach
- Moved agy to conditional_slash (gated on ai_skills_enabled)
- Kept existing reformatted code style for frozenset and imports
Copilot AI review requested due to automatic review settings June 4, 2026 20:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

src/specify_cli/extensions.py:2652

  • claude_skill_mode and cursor_skill_mode are computed but no longer used after the refactor to the always_slash/conditional_slash logic. Removing these unused locals (or using them in use_slash) will reduce dead code and keep the invocation selection easier to audit.
        codex_skill_mode = selected_ai == "codex" and ai_skills_enabled
        claude_skill_mode = selected_ai == "claude" and ai_skills_enabled
        kimi_skill_mode = selected_ai == "kimi"
        cursor_skill_mode = selected_ai == "cursor-agent" and ai_skills_enabled
        cline_mode = selected_ai == "cline"

Comment thread tests/integrations/test_integration_zed.py Outdated
Comment thread src/specify_cli/extensions.py
Comment thread src/specify_cli/extensions.py Outdated
Comment thread docs/index.md
Comment thread docs/index.md
- Added copilot to CONDITIONAL_SLASH_AGENTS for consistent
  hook invocation rendering with init.py
- Moved always_slash/conditional_slash frozensets to module
  scope to avoid per-call reallocation
- Replaced manual os.chdir() with monkeypatch.chdir() in test
- Overrode test_options_include_skills_flag for Zed (no --skills)
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.

[Agent]: Add support for Zed

3 participants