Skip to content

feat(dialect): add Zed adapter compiling skills to .agents/skills (fixes #15) - #22

Merged
00200200 merged 1 commit into
00200200:mainfrom
nilay1221:feat/zed-adapter
Sep 27, 2026
Merged

00200200 merged 1 commit into
00200200:mainfrom
nilay1221:feat/zed-adapter

Conversation

@nilay1221

@nilay1221 nilay1221 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add Zed as Cinch's 10th supported harness. cinch init --harness zed and cinch preview <item> --target zed now compile skills, agents, and commands into Zed's native Agent Skills layout at .agents/skills/<name>/SKILL.md.

Implements #15.

Scope decision: vendor accuracy over the issue's proposed .zed/prompts/

Issue #15 proposed .zed/prompts/<name>.md. Current Zed documentation does not define a .zed/prompts/ format. Per CONTRIBUTING.md ("Vendor Accuracy: every target path and dialect emitted is backed by vendor documentation"), this PR targets the documented layout instead:

  • Global: ~/.agents/skills/<name>/SKILL.md
  • Project-local: <worktree>/.agents/skills/<name>/SKILL.md (flat; nested folders are not discovered)
  • Frontmatter: name, description, optional disable-model-invocation only

Recorded in tests/conformance/zed/SOURCE.md against https://zed.dev/docs/ai/skills.

Out of scope, as agreed: .zed/prompts/, MCP/context servers, AGENTS.md/.rules, hook translation, and the pre-existing wire.py support-copy quirk (documented below, not fixed).

What changed

File Change
src/cinch/adapters.py New ZedAdapter (renders .agents/skills/<name>/SKILL.md, emits no paths; commands get disable-model-invocation: true) registered in ADAPTERS
src/cinch/catalog.py "zed" appended to HARNESS_ORDER; HARNESSES["zed"] spec (binaries/home markers/project markers/skill source/project dirs)
tests/conformance/zed/SOURCE.md Vendor conformance fixture
tests/test_translation.py TestZedAdapter unit tests + single-target and cursor,zed shared-path integration tests
tests/test_cinch.py Harness-id list + Zed title assertion; non-interactive init --harness zed and preview --target zed coverage
tests/test_conformance.py Docstring count 9 → 10 (parametrized suite now covers zed)
README.md Badge 9 → 10; matrix row; performance-table label; new Zed docs subsection (paths, / + @skill invocation, cmd-alt-l/ctrl-alt-l, trusted worktree, link)
CHANGELOG.md Unreleased → Added entry
pyproject.toml Description/keywords mention Zed
examples/README.md Notes .agents/skills/ is also read by Zed
benchmark/run.py Docstrings and results header made dynamic (10 adapters) instead of hard-coded 9

Shared path behaviour

Zed shares .agents/skills/ with Cursor and Codex. A --harness cursor,zed run writes the file once (as Cursor's rendering, which includes paths) and reports Zed as shared with shared_with: "cursor"; the extra paths key is ignored by Zed. Wire --harness zed alone for Zed's minimal frontmatter. This ordering is covered by test_cursor_and_zed_share_agents_path.

Known behaviour (documented, not fixed)

wire.py::_apply_file copies a skill's support directory before writing the main file. When support_dest is the parent of the main relpath (Claude/Cursor/Codex/Zed multi-file skills), the copied SKILL.md makes the destination pre-exist, so the outcome can be exists rather than written. Pre-existing, unaffected by this change, left out of scope.

Verification

uv run ruff check src tests        # all checks passed
uv run ruff format --check src tests  # 33 files already formatted
uv run pytest                      # 122 passed

Also verified manually: cinch harnesses lists Zed; cinch inventory --harness zed runs and lists Zed; benchmark/run.py reports Adapters Tested (10) and Translation Latency (10 dialects).

…200200#15)

Add Zed as Cinch's 10th supported harness. Zed's agent loads Agent Skills
from the cross-vendor .agents/skills/<name>/SKILL.md layout (global
~/.agents/skills or project-local <worktree>/.agents/skills), so the new
ZedAdapter emits only the documented name, description, and, for commands,
disable-model-invocation frontmatter fields. No paths/globs are emitted.

- src/cinch/adapters.py: ZedAdapter + ADAPTERS registration
- src/cinch/catalog.py: append zed to HARNESS_ORDER and HARNESSES
- tests/conformance/zed/SOURCE.md: vendor documentation fixture
- tests/test_translation.py: adapter unit tests + integration/shared-path
- tests/test_cinch.py: harness-id list + CLI init/preview coverage
- README/CHANGELOG/pyproject/examples/benchmark: counts and docs

Zed shares .agents/skills with Cursor/Codex; when wired together the first
target writes and later targets report shared. The pre-existing wire.py
support-copy behaviour is left untouched and documented as known.

Also makes test_interactive_empty_inventory_none_selected independent of
which harness CLIs happen to be installed on the host PATH (pre-existing
environment-dependent flake).

Refs 00200200#15
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request tests Testing and quality assurance labels Sep 27, 2026

@00200200 00200200 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Excellent work @nilay1221! Comprehensive adapter implementation, thorough conformance tests, and accurate vendor documentation. Thank you for contributing! 🚀

@00200200
00200200 merged commit 1cae213 into 00200200:main Sep 27, 2026
11 of 13 checks passed
nilay1221 added a commit to nilay1221/cinch that referenced this pull request Sep 27, 2026
Zed now appears as a regular dialect in the One Skill, Every Dialect
(The Rosetta Stone) section, matching the other harnesses' format.
Removes the standalone Zed subsection from the harness matrix section.

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request tests Testing and quality assurance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants