Skip to content

Add ZCode provider - #1166

Open
madsiberian wants to merge 6 commits into
pbakaus:mainfrom
madsiberian:add-zcode-provider
Open

madsiberian wants to merge 6 commits into
pbakaus:mainfrom
madsiberian:add-zcode-provider

Conversation

@madsiberian

@madsiberian madsiberian commented Oct 24, 2026 •

Copy link
Copy Markdown

@C:/Users/Coder/AppData/Local/Temp/pr-body.md


Note

Low Risk
Additive provider wiring across build, CLI, and docs with targeted tests; no changes to auth, hooks, or existing provider behavior beyond new registry entries.

Overview
Adds ZCode as a first-class Impeccable provider so skills can install to .zcode/skills/ (project) or ~/.zcode/skills/ (global), with npx impeccable link --providers=zcode and the usual build/sync paths.

The build pipeline gets a zcode transformer config (.zcode dir, license/metadata frontmatter, version in metadata like Codex). Runtime treats ZCode like Codex for UX: $impeccable command prefix, Codex-style pinned shortcuts, and .agents fallback for skill discovery per harness docs.

Rust skills/context layers register .zcode in provider lists, aliases, install hints (~/.zcode), pin harness dirs, and content-hash normalization. Docs (README, HARNESSES, CLI contract, DEVELOP), issue/PR templates, and CI sync for .zcode/** are updated; tests cover name resolution and home-dir detection.

Reviewed by Cursor Bugbot for commit 7597c19. Bugbot is set up for automated code reviews on this repo. Configure here.

ZCode (https://zcode.z.ai/en/docs/skill) reads the Agent Skills spec
subset — name/description required (a description over 1024 chars drops
the skill), license and metadata preserved, unknown fields silently
ignored by its flat frontmatter parser — and discovers skills from
.zcode/skills (project) and ~/.zcode/skills (user), the default
user-dir formula, so no home override is needed. No hook or subagent
emission yet: its config-driven hook surface (.zcode/config.json
hooks, off by default) is not targeted.

Registry entries in the skills crate (dirs, aliases, display, input
order, global harness hints), the context crate harness maps, the
transformer factory config + placeholders + block tags, HARNESSES.md
capability rows, README provider docs, and the sync workflow's
GENERATED_PATHS (the .zcode tree is generated output and is
intentionally not committed here; the workflow emits it after the
next engine release).
@madsiberian
madsiberian requested a review from pbakaus as a code owner October 24, 2026 05:28
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Adds ZCode support across generated skills, CLI installs, runtime messages, and pinned shortcuts.

  • Impeccable builds and documents skills for ZCode.
  • ZCode installs are detected and use $impeccable shortcuts.

Review used the full PR diff because the current and previously reviewed commits have different merge bases with the target commit. Checks were based on source inspection; builds and tests were not run.

Reviews (7) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

Comment thread docs/HARNESSES.md Outdated
The ZCode column rewrite transcribed DeepSeek Harness's metadata cell
as Ignored; main has Yes (its note reads metadata and the dsh provider
config emits it). Review finding on pbakaus#1166.
@madsiberian

Copy link
Copy Markdown
Author

Good catch — that was a transcription slip in the ZCode column rewrite, not an intended change: main had Yes (matching the DSH note and the dsh provider config emitting metadata), and my rebuild of the row copied the license/compatibility ending. Restored to Yes in 3cb1b7e, and verified per-cell that every other original cell in the table is byte-identical to main with only the ZCode column appended.

@pbakaus pbakaus added the policy: needs issue PR needs an issue and maintainer approval before continuing label Oct 24, 2026 — with ChatGPT Codex Connector

pbakaus commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Thanks for taking the time to contribute. Impeccable is issue-first for outside contributions, and I could not find a relevant linked issue where a maintainer approved or requested this work. I’m closing this for now. Please open or join an issue, wait for explicit approval from @pbakaus or @abdulwahabone, and then open a fresh PR. This policy check was performed automatically by Codex; if it missed existing approval, please point a maintainer to it.

@abdulwahabone

Copy link
Copy Markdown
Collaborator

Reopened after approval on #1176. I reviewed the change against the ZCode source (zai-org/ZCode, Apache-2.0) rather than the docs, and the provider claims hold up: both skill roots, the .agents/skills companion root, the 1024-char description cap that drops the skill, the five recognized frontmatter keys, the flat line parser, and AGENTS.md at the project root and ~/.zcode/. The Rust and JS wiring mirrors the Vibe provider spot for spot. Nice work.

Before this merges, three groups of changes.

Accuracy

  • The hooks note (HARNESSES.md and the providers.js comment) conflates two files. User-level hooks live in ~/.zcode/cli/config.json behind hooks.enabled; workspace .zcode/config.json hooks are documented as never executed, and the source gates them behind a per-user trust store. Simplest fix is to drop the sentence rather than correct it (see trims below).
  • Prefix: ZCode invokes skills with $skill-name, the Codex convention, while the PR sets command_prefix: '/'. The slash panel also lists skills, so / works. If we switch to $, it is a three-place change: the utils.js placeholder, the Codex-only test in crates/context/src/provider.rs (command_prefix), and CODEX_HARNESSES in pin.rs. Paul's call; say which you picked in the PR body.

Trims, to keep the diff surgical

  • Remove crates/skills/tests/zcode_detection_tests.rs. ZCode has no provider-specific detection code; it reaches detection through the generic PROVIDER_DIRS loop and the Hint::Home arm, and no plain-home provider has a detection test file. zcode_provider_resolves in providers.rs follows the OMP/DSH precedent and is enough. If you want one assertion that .zcode is in the hint table, fold a single case into install_detection_tests.rs, which already has the helpers.
  • Shorten the providers.js zcode comment to two lines plus the docs link, matching the hermes and DSH entries. HARNESSES.md is the source of truth for capabilities.
  • In the HARNESSES.md ZCode bullet, drop the hook-surface sentence and replace the two em dashes (docs/STYLE.md bans them).

Places a new provider touches that are missing here (compare the Qoder and DSH additions)

  • docs/CLI-CONTRACT.md: PROVIDER_DIRS, aliases, GLOBAL_HARNESS_HINTS, and HARNESS_DIRS lists.
  • crates/skills/src/bundle.rs: PROVIDER_PATH_RE.
  • AGENTS.md: the tracked harness-folder list.
  • .gitattributes: .zcode/** linguist-generated.
  • docs/DEVELOP.md: the harness docs link list.
  • .github/PULL_REQUEST_TEMPLATE.md and .github/ISSUE_TEMPLATE/feature_request.md: provider checklists.

Optional: version: is emitted by default and is not in ZCode's safe-key set, so zcode skills inspect reports safeToAutoLoad: no. Cosmetic only; versionInMetadata: true on the provider config would clear it.

AI assistance disclosure: this review was drafted with Claude Code under my direction, with the ZCode claims verified against the zai-org/ZCode source.

@github-actions github-actions Bot added blocked: merge conflicts PR cannot merge until conflicts are resolved waiting on contributor Waiting for the PR author to respond or make changes labels Oct 26, 2026
…erage

- Prefix: ZCode invokes skills with $skill-name (the Codex convention);
  utils.js placeholder, provider.rs prefix selection, pin.rs CODEX_HARNESSES
- Trim: drop zcode_detection_tests.rs; one .zcode hint assertion folded into
  install_detection_tests.rs
- Trim: providers.js zcode comment to two lines + docs link; HARNESSES.md
  hook-surface sentence dropped, em dashes replaced
- Coverage: CLI-CONTRACT.md provider lists, bundle.rs PROVIDER_PATH_RE,
  AGENTS.md harness list, .gitattributes linguist-generated, DEVELOP.md link,
  PR + issue template checklists
- versionInMetadata: true so zcode skills inspect reports safeToAutoLoad: yes

AI assistance disclosure: prepared with a ZCode agent under the contributor's direction.
@madsiberian

Copy link
Copy Markdown
Author

Review round addressed in 4fc7ddc — thanks for the thorough pass, and for verifying the claims against the ZCode source.

  • Prefix: picked $ (the native ZCode convention, as with Codex) — also noted in the PR body. Three-place change: utils.js placeholder, provider.rs prefix selection, CODEX_HARNESSES in pin.rs.
  • Hooks note dropped from HARNESSES.md; providers.js comment trimmed to two lines + docs link; em dashes replaced.
  • Trims: zcode_detection_tests.rs removed; a single .zcode home-hint assertion folded into install_detection_tests.rs.
  • Missing places added: CLI-CONTRACT.md (PROVIDER_DIRS, aliases, GLOBAL_HARNESS_HINTS, HARNESS_DIRS, scripts-path list, prefix note, provider-name list), bundle.rs PROVIDER_PATH_RE, AGENTS.md harness-folder list, .gitattributes linguist-generated, DEVELOP.md link, PR + issue template checklists.
  • versionInMetadata: true — zcode skills inspect now reports safeToAutoLoad: yes.

Validation: cargo test -p impeccable-context -p impeccable-skills all green (incl. the folded hint test); default bun suite 477 pass / 2 fail, both pre-existing on this Windows box (launcher exec-bit, native component-review bundle). dist/zcode emission re-verified: version now rides inside metadata.

AI assistance disclosure: these fixes were prepared with a ZCode agent under my direction.

Conflict resolution against 4.8.0 (Devin + Replit providers, HARNESS_HINTS
refactor): zcode additions re-based onto the new undotted hint convention
(Hint::Home(".zcode", "zcode")), provider lists unioned with .devin/.replit,
zcode detection test rebuilt on the upstream install_detection_tests base.

AI assistance disclosure: this merge was prepared with a ZCode agent under the contributor's direction.
Comment thread docs/HARNESSES.md Outdated
Remove the blank line before the Devin row in the docs and directory
tables (left over from the 4.8.0 merge conflict resolution) and collapse
the doubled blank lines after the ZCode rows.

AI assistance disclosure: prepared with a ZCode agent under the contributor's direction.
@madsiberian

Copy link
Copy Markdown
Author

Fixed in 7597c19: the blank lines were merge-conflict-resolution leftovers around the Devin/ZCode rows; removed from both tables and the doubled blanks after the ZCode rows collapsed.

AI assistance disclosure: prepared with a ZCode agent under my direction.

@github-actions github-actions Bot removed the blocked: merge conflicts PR cannot merge until conflicts are resolved label Oct 27, 2026
Clean merge of the detector work (pbakaus#1196-pbakaus#1201): no overlap with the
provider surface; zcode diff vs origin/main unchanged.

AI assistance disclosure: this merge was prepared with a ZCode agent under the contributor's direction.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

policy: approved policy: needs issue PR needs an issue and maintainer approval before continuing waiting on contributor Waiting for the PR author to respond or make changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants