mirror of
https://github.com/github/spec-kit.git
synced 2026-07-06 05:53:12 +08:00
* feat: add ZCode (Z.AI) integration Add a skills-based integration for ZCode, Z.AI's Claude-Code-style agent. ZCode uses the same SKILL.md layout as Claude Code, so spec-kit installs workflows into .zcode/skills/speckit-<name>/SKILL.md, invoked in chat as $speckit-<name>. - ZcodeIntegration(SkillsIntegration) with .zcode/ folder and --skills option - Register in INTEGRATION_REGISTRY - Catalog entry (tags: cli, skills, z-ai) - Tests via SkillsIntegrationTests mixin - Document in integrations reference and README Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: render $speckit-* invocations for ZCode skills ZCode is documented as a skills agent invoked with $speckit-<command>, but the central invocation rendering only special-cased codex, so specify init Next Steps and extension hooks rendered the dotted /speckit.<command> form instead. Centralize the $speckit-* decision in a DOLLAR_SKILLS_AGENTS set with an is_dollar_skills_agent() helper, and route both init Next Steps and HookExecutor._render_hook_invocation through it. Add ZCode invocation regression tests mirroring the existing Codex/Kimi coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
"""ZCode integration — skills-based agent (Z.AI).
|
|
|
|
ZCode uses the ``.zcode/skills/speckit-<name>/SKILL.md`` layout, matching
|
|
the Claude Code skill format. Skills are invoked in chat with
|
|
``$speckit-<name>``. Z.AI recommends skills (over simple ``/`` commands)
|
|
for template- and script-driven workflows such as spec-kit.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from ..base import IntegrationOption, SkillsIntegration
|
|
|
|
|
|
class ZcodeIntegration(SkillsIntegration):
|
|
"""Integration for ZCode CLI (Z.AI)."""
|
|
|
|
key = "zcode"
|
|
config = {
|
|
"name": "ZCode",
|
|
"folder": ".zcode/",
|
|
"commands_subdir": "skills",
|
|
"install_url": "https://zcode.z.ai/",
|
|
"requires_cli": True,
|
|
}
|
|
registrar_config = {
|
|
"dir": ".zcode/skills",
|
|
"format": "markdown",
|
|
"args": "$ARGUMENTS",
|
|
"extension": "/SKILL.md",
|
|
}
|
|
context_file = "ZCODE.md"
|
|
multi_install_safe = True
|
|
|
|
@classmethod
|
|
def options(cls) -> list[IntegrationOption]:
|
|
return [
|
|
IntegrationOption(
|
|
"--skills",
|
|
is_flag=True,
|
|
default=True,
|
|
help="Install as agent skills (default for ZCode)",
|
|
),
|
|
]
|