Files
agency-agents/integrations/zcode/README.md
T
Michael Sitarzewski 00fb28a4cf feat(tools): add ZCode (Z.ai GLM agent harness) (#700)
* feat(tools): add ZCode (Z.ai GLM agent harness)

ZCode reads per-agent markdown from `.zcode/agents/{slug}.md` (project) and
`~/.config/zcode/agents/{slug}.md` (global), with `name` + `description` YAML
frontmatter and an optional `tools` list — the same plain-agent-markdown shape
as Qwen.

- tools.json: add the `zcode` entry (dual-scope, per-agent, format `zcode-md`).
- convert.sh: add `convert_zcode` (byte-identical to the qwen converter,
  output to integrations/zcode/agents/) + register in the dispatch, valid_tools,
  tools_to_run, and parallel_tools.
- install.sh: add `zcode` to ALL_TOOLS, `install_zcode`, `detect_zcode`, and the
  resolve_dest / bin / is_detected / display / label dispatches.

Directories + file format verified against ZCode's published docs. Renderer
contract: `zcode-md` output is byte-identical to `qwen-md`, verified by
diffing `convert.sh --tool zcode` against `--tool qwen` (243/243 files match).

check-tools.sh passes (16 tools consistent across tools.json, install.sh, and
convert.sh); bash -n clean on both scripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdX6PvnCfRgYD11yVpXVor

* zcode: gitignore generated output + add integration README

Bring the ZCode integration in line with the other tools: the 243 generated
agent files (integrations/zcode/agents/*.md) are output of `convert.sh`, not
source — add a .gitignore rule so they can't be committed, and add
integrations/zcode/README.md documenting generate/install (matching the vibe
and qwen integration READMEs).

Verified: generated agents are now git-ignored, the README is tracked, and
check-tools.sh still passes at 16 tools.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq

* zcode: fix user-scope install path to ~/.zcode/agents (per ZCode docs)

The user-scope dest was ~/.config/zcode/agents/, but the official ZCode docs
state subagents are read from ~/.zcode/agents/<name>.md — so user-scope
installs landed where ZCode never looks. (detect.agentsDir and project scope
were already correct at .zcode/agents, so this was an internal inconsistency.)

Point tools.json dest.user, install_zcode's default, the header comment, and
the list display at ~/.zcode/agents; drop the stale ~/.config/zcode detection
clause; update the integration README. Keep format `zcode-md` distinct — ZCode's
native format supports color/model/permissions, so it will diverge from gemini-md
as the converter matures rather than being a permanent alias.

Verified: a default user-scope install now writes to ~/.zcode/agents/<slug>.md
(not ~/.config/zcode); check-tools.sh passes at 16 tools; install.sh syntax and
tools.json JSON both valid.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 11:29:16 -05:00

30 lines
922 B
Markdown

# ZCode Integration
[ZCode](https://z.ai) is Z.ai's GLM-based coding agent harness. Each agency
agent is rendered as a standalone Markdown agent file with `name` and
`description` frontmatter, which ZCode discovers from its agents directory.
The generated files come from `scripts/convert.sh --tool zcode`, which writes
one Markdown file per agency agent into `integrations/zcode/agents/`. Those
generated files are not committed (see `.gitignore`); regenerate them locally.
## Generate
From the repository root:
```bash
./scripts/convert.sh --tool zcode
```
## Install
Run the installer from your target directory:
```bash
cd /your/project && /path/to/agency-agents/scripts/install.sh --tool zcode
```
Agents install to `~/.zcode/agents/<slug>.md` (user scope) — the directory
ZCode reads subagents from. Use `--division` / `--agent` to install a subset,
or set `ZCODE_AGENTS_DIR` to override the destination.