Buckets:
AGENTS.md
Guidance for working in this repository. Read this before making changes.
Zuke is a code-first, strongly-typed build automation system for Deno/TypeScript.
This file,
AGENTS.md, is the single source of truth for both humans and agents.CLAUDE.mdis a thin pointer whose entire content is@AGENTS.md, so Claude Code loads this file and there is exactly one copy to maintain.
Using Zuke — the API, without guessing
If you are wiring Zuke into a project, do not guess the API and do not fall
back to Deno.Command/shell. Every operation has a typed wrapper, and the
exact signatures are published — read them:
- Check the package catalogue before writing any command.
llms.txt's## Packagescatalogue (raw: https://raw.githubusercontent.com/zuke-build/zuke/master/llms.txt) and the grouped table inskills/zuke-write-build/references/cheatsheet.mdare the only ways to answer "does a@zuke/<tool>wrapper exist for this CLI?" — per-packagedeno doc jsr:@zuke/<package>can only describe a package whose name you already know; it cannot reveal that a package exists. Reaching forCmdTasks.exec(jsr:@zuke/cmd) or a raw$/Deno.Commandfor a tool that has a@zuke/<tool>package is a bug, not a style choice — it discards typed flags, argv purity, and tool resolution. - One file with the whole typed surface of every package:
llms-full.txtat the repo root.llms.txtis the short index. - A single wrapper on the command line:
deno doc jsr:@zuke/<package>(e.g.deno doc jsr:@zuke/deno). - On each package's JSR page / README: a generated
## APIsection. - The CLI surface — commands, flags, and a build's actual targets: run
./zuke --help(ordeno run -A zuke.ts --help). It prints the usage grammar, every reserved command (graph,generate-ci,completions <print|install> <shell>,mcp,resume,runs,cancel,register,doc) and flag, plus the current build's targets — with descriptions and dependencies — and its parameters. So an agent asked to set up or run a build discovers the real command surface live instead of guessing;zuke --listis the targets-only view andzuke --list --jsonemits the whole surface (commands, flags, targets, parameters) as JSON for tools. The written reference isdocs/cli.md, andllms.txtcarries a generated## CLIsection; the same data is available in code via the exporteddescribeCli(build).
The mental model:
A build is a class that extends
Build. Each target is a class field built withtarget():.description(...),.dependsOn(...),.executes(async () => { … }).Dependencies are
this.<field>references, not strings —dependsOn(this.lint), neverdependsOn("lint")— so renames and typos are compile-time errors. A target may only depend on siblings declared above it (fields initialise top-to-bottom).Make the file runnable with
await run(MyBuild)at the bottom — noif (import.meta.main)guard;runno-ops when the module is imported.Import
@zuke/*by bare specifier, declaring it indeno.json—import { DenoTasks } from "@zuke/deno";with"@zuke/deno": "jsr:@zuke/deno@^1"in theimportsblock, which is whatdeno add jsr:@zuke/denowrites for you. Never inline thejsr:specifier in the import statement: Deno's default lint set (the one that applies whendeno.jsonconfigures nolint.rules, which is whatzuke setupscaffolds) rejects it underno-import-prefix, so an inlined one fails the project's owndeno task lint. The caret major is pinned in the map instead, so a future@zukemajor cannot land unannounced. A subpath such as@zuke/core/shellresolves through the same entry.Every external tool is a namespaced
*Tasksobject (DenoTasks,NpmTasks,DockerTasks,GitTasks, …) configured with a settings lambda that mirrors the real CLI's flags:import { Build, run, target } from "@zuke/core"; import { DenoTasks } from "@zuke/deno"; class CI extends Build { lint = target().executes(async () => { await DenoTasks.lint(); }); test = target().dependsOn(this.lint) .executes(async () => { await DenoTasks.test((s) => s.allowAll().coverage("cov_profile")); }); } await run(CI);
These three artifacts (llms.txt, llms-full.txt, and every package's README
## API block) are generated from deno doc by ./zuke apiDocs, and CI
fails (./zuke apiDocsCheck) if they drift — so any change to a public API must
regenerate them in the same PR.
Tech stack
- Runtime & toolchain: Deno (2.x). All tooling — test
runner, formatter, linter, type-checker, coverage — is the built-in
denoCLI. No Node, npm, or external build tools. - Language: TypeScript, strict mode (Deno's default).
- Distribution: JSR as a workspace of 70 packages:
@zuke/core(exports.,./shell,./tooling,./tooling/conformance,./render,./conformance) plus the@zuke/clicommand, a generic@zuke/cmdfallback, and 50+ typed tool wrappers and plugins (@zuke/deno,@zuke/npm,@zuke/docker,@zuke/ai, …). The npm org@zuke-buildis reserved for future npm distribution (1:1 name mapping). - No runtime dependencies. The library is dependency-free; tests use a local
assertion helper (
packages/core/tests/_assert.ts) rather than a third-party assert library so the suite runs with zero network access. This is a claim about the published packages — everypackages/*/deno.json— and it is enforced by them declaring none. The build layer is separate and does have dependencies: cspell and release-please are installed from npm on demand byinstallCli, and the rootdeno.jsonimports@std/yamlforbuild/. Nothing underpackages/may import any of them.
TypeScript 7 / tsgo
The request is to use tsgo (the native TypeScript port) if Deno supports
it. Status as of 2026-07-30:
- TypeScript 7.0 shipped (2026-07-08) and the native Go compiler is no
longer a side channel: it is the
tscin the ordinarytypescriptpackage.@typescript/native-previewand thetsgobinary name now mean the bleeding-edge nightly channel, not "the native compiler". - Deno can use it, but only unstably.
deno check --unstable-tsgo(DENO_UNSTABLE_TSGO=1, or"unstable": ["tsgo"]indeno.json) runs the native compiler with Deno's own module resolution. Deno's docs call it "an unstable, preview feature" that is not feature-complete — programs that pass the default checker can report different results — and say "Don't rely on it for CI or release builds yet."
Therefore: deno check (default compiler) stays the authoritative
type-checker for this repo and for CI. Try --unstable-tsgo locally when a
type-check feels slow, but do not put it in the check task or the gate until
Deno drops the unstable flag. Do not bolt on a parallel tsc/tsgo pass that
can't see Deno's module graph.
Coding guidelines (non-negotiable)
Strict, strongly-typed TypeScript.
- Never use
any. Theno-explicit-anylint rule is enabled. - Never use
asto force a type or silence the compiler, and avoid the non-null assertion!. Narrow with control flow and type guards instead (e.g.value instanceof Error ? value.message : String(value)). - The single sanctioned escape is a
// @ts-expect-errorin a test that deliberately exercises a runtime guard against type-unsafe input, with a comment explaining why. Do not use it insrc/.
- Never use
All linting, formatting, type-checking, and tests must always pass. Run
deno task ci(which delegates to./zuke ci, the same gate CI runs) before committing; it must be green.Keep test coverage at 95%+ (lines and branches) at all times. Enforced by the coverage gate built into
DenoTasks.coverage(a.threshold()parses the lcov report and fails the build), wired up in thecovtask /zuke coveragetarget and in CI. New code needs new tests in the same change — see Testing for the required layers (always unit + integration; e2e for bigger features).Document every public symbol — JSDoc on ALL of it. A JSDoc comment is required on every exported symbol and on every public member of an exported class or interface: methods, fields (including the trailing-underscore internal fields that are still public on an exported class), constructors, and the
override name = "…"line on an error class. A first-party type that appears in a public signature must itself be exported and documented — never leave aprivate-type-refto one of the package's own types. Verify withdeno doc --lintrun over all of a package's entrypoints in one invocation (a multi-entrypoint package like@zuke/corehas.,./shell,./tooling,./tooling/conformance,./render,./conformance, sodeno doc --lint packages/core/mod.ts packages/core/src/shell.ts …— linting them together lets cross-entrypoint references resolve). The bar: zeromissing-jsdocand zeroprivate-type-refto a first-party type. The one acceptable residual is aprivate-type-refinto another published@zuke/*package (e.g. a wrapper referencingConfigure/CommandOutputfrom@zuke/core) — that dependency documents the type and JSR links to it, exactly as the existing tool wrappers do; do not re-export a dependency's type just to silence the lint. Bothmissing-jsdocand first-partyprivate-type-reflower the package's JSR documentation score. Match the existing density and tone when adding docs.Tests are hermetic and fast. No network, no reliance on ambient tools. When a test needs a subprocess, invoke
Deno.execPath()(the runningdeno), which is always present and shell-free.Public API is task-shaped — no standalone utility functions. A package exposes its operations through a namespaced
*Tasksobject (FileTasks,DenoTasks,JsrTasks, …), never as bare exported helper functions. CLI wrappers build argv through the settings-lambda style (ToolSettings/buildArgs); task groups that run no subprocess (e.g.FileTasks) take direct arguments plus an options object. Group related operations under one task object rather than adding a loose function tomod.ts, and keep internal helpers unexported. (The framework primitives a build is defined with —Build,target,group,run— are the deliberate exception.)Mirror the real CLI. Name a wrapper's task methods and settings after the actual subcommands and flags they invoke —
CspellTasks.lintrunscspell lint, not a prettier alias likecheck. Staying close to the tool's own vocabulary keeps the wrapper predictable for anyone who knows the CLI.One domain per file — never the whole implementation in one module. Split a package's source into small, cohesive files by class and concern (types, errors, each fluent settings class, the transport/provider layer, parsing, the orchestrator), and re-export the public surface from
mod.ts. A single file accreting every class and helper is a smell — break it up as it grows, not later. Prefer reusing core primitives (FileTasks,glob/globToRegExp, the$/Commandshell, the HTTP helpers) over re-implementing them in a package.Every source file starts with the copyright and license header. ALL new files — every
.tsfile (tests, fixtures, and generated-file templates included), and any launcher or script — open with these two lines (after the shebang, where one exists), before everything else:// Copyright (c) 2026 the Zuke contributors // SPDX-License-Identifier: MITShell/PowerShell files use
#comments for the same two lines. This is the per-file copyright and license identification the OpenSSF Best Practices criteria require, and it is enforced:tests/license_headers_test.tsfails the suite on any source file missing the header. A generated file gets its header from its template (seeinternal/hcl_tool.ts.tmpl) — put the header in the template, never hand-edit generated output.No dead code. Code that cannot execute does not ship: remove unreachable branches, unused helpers and exports, and fallbacks whose condition can never fire (e.g. a
?? defaultbehind a parameter no call site ever omits). Prefer making the impossible state unrepresentable — tighten the parameter's type, drop the?, narrow withExclude<...>— over keeping a loose signature guarded by an arm that never runs. Keep the line straight, though: narrowing that the type system forces (map.get(x) ?? fallback,value instanceof Error ? value.message : String(value), anundefinedcheck after.find(...)) is not dead code — guideline 1 bans the!/asshortcuts that would replace it. A branch is dead only when it is unreachable after the types are as tight as the call sites allow. And never write a test whose sole purpose is to "cover" a dead arm — an uncoverable branch is the signal to delete the branch, not to feed the coverage gate.Configuration is a fluent settings lambda, not an options object. When an API takes more than a trivial amount of configuration, expose it as a chainable settings class configured through a lambda — the
Configure<S> = (s: S) => Sshape the tool wrappers use — not a positional options bag. Prefer.lock((s) => s.lockKey("deploy", repo).withTtl("4h").onConflict(...))over.lock(key, { ttl, onConflict }). Each setter returnsthis, the fields use the trailing-underscore internal convention (and are still JSDoc'd), and the lambda defers evaluation until call time — so a value derived fromthis.<param>.valuesees the resolved value. This keeps the whole authoring surface consistent withDenoTasks.test((s) => …),service(), and the CI builder, and lets options grow without churning call sites. A single required scalar (a path, a name) can still be a direct argument; reach for the lambda once there are options to set.Reuse the helper; never paste a second copy. Before writing a helper, look for the one that exists. The shared surface to check first:
packages/core/src/internal.ts(messageOf,readEnv,sha256Hex, the read-or-null and write-with-mkdir file helpers),packages/core/src/tooling.ts(ToolSettings,SubcommandSettings,defineTool,ToolNotFoundError),shell.ts($,Command),file.ts(FileTasks), pluspath.ts,glob.ts,http.ts,yaml.ts,secret.ts,render.tsandcompression.ts. In a wrapper or plugin package, check that package's own unexported modules —packages/gh/src/api.tsandcredentials.tsare the pattern: one transport, one credential resolution, imported by every task in the package.A near-copy that differs by a constant, a flag name, or a message is a copy-paste, not a variation. Parameterise the difference and keep one implementation. This is not a style preference — the copies drift, and the drift is where the bugs live. Every one of these was real: two implementations of the zip-slip guard, two Markdown escapers where only one collapsed newlines (so a model-supplied string could inject block-level Markdown into a PR comment), two loopback checks that disagreed about
[::1], twoenv()readers that disagreed about an empty token, and aJSON.parseguard that landed in one of two twin stores. A guard or an escape whose whole value is being applied everywhere must have exactly one implementation.Where a shared unit belongs, in order of preference:
- an unexported module in the same package, imported by its call sites — the default, and what keeps a dedup free of release consequences;
- an existing
@zuke/coreexport, if one already covers it; - a new
@zuke/coreexport only when the need is genuinely cross-package — it brings JSDoc on every symbol, a cleandeno doc --lint, and regeneratedllms.txt/llms-full.txt/README API blocks in the same change.
Two constraints shape the choice. A wrapper package may depend only on
@zuke/core— never on another wrapper, never on@std/*— so "share it between two wrappers" means core or nothing. The one exception is a rich feature package: one that orchestrates other tools rather than wrapping one (@zuke/cli,@zuke/ai). Such a package should call the wrapper that already exists —@zuke/aiposts its reactions throughGhTasks— rather than grow a second, drifting copy of it. Each exemption is named inPACKAGE_DEPENDENCIES(build/packages.ts), andtests/package_dependencies_test.tsfails on any@zuke/*import that is not listed, so adding one is a reviewed decision. Expect the list to grow as more such packages appear; a plain tool wrapper never belongs on it. A dependent must come after its dependencies inPACKAGES, the publish order, and the core-floor check resolves a listed sibling from the local workspace (it is released from the same commit) while still pinning core to its published floor. Anddeno doc --lintreportsprivate-type-refwhen an exported class extends an unexported one, so prefer sharing the logic as plain internal functions over introducing a base class an exported settings class would extend.Do not unify what only looks alike. Two wrappers each having a
.cwd()is them mirroring two real CLIs (guideline 7), not duplication. Reject the abstraction when it would be larger than the duplication it removes, when it needs a parameter no call site varies (that is dead flexibility, guideline 10), or when it would reorder generated output. Prefer few, large, certain consolidations over many speculative ones.SOLID, in the shapes this codebase actually takes. The principles are not decoration here; each one has a concrete form:
- Single responsibility — one domain per file (guideline 8). A class that fuses unrelated concerns, or a method long enough to hold several sequential phases, is split so each part can be read and tested alone. Length is a symptom, not the defect: name the responsibilities before splitting, and if there is genuinely one, leave it.
- Open/closed — extend through the settings lambda (guideline 11) and
through new
*Tasksmethods, not by adding a flag that switches an existing function between two behaviours. - Liskov — a settings subclass must not weaken what its base promises;
buildArgs()stays pure in every implementation. - Interface segregation — a task takes the narrow type it needs. Passing
a whole settings object where a resolved
stringand aGhCallwould do is what forces the next caller to construct state it has no use for. - Dependency inversion — depend on the seam, not the implementation:
StateHost/StateStoreover directDeno.*calls, an injectedfetchover the global,EnvReaderoverDeno.env. This is also what keeps the tests hermetic (guideline 5), so the two rules reinforce each other.
Testing
Zuke has three test layers. Every change ships tests in the same PR — at minimum a unit test and an integration test; a bigger feature (a new flow mechanism, or anything with cross-process or cross-OS behaviour) also adds an e2e test. All three obey guideline 5: hermetic and fast, no network, no ambient tools.
The gate's test target splits the *_test.ts files across one deno test
process per CPU (build/test_shards.ts), so files run concurrently with each
other in separate processes, while the tests inside one file still run in
order. A test may set Deno.env or change the working directory, which only
affect its own process, but it must not write to a fixed path that another file
could also use: work in a Deno.makeTempDir() instead. Name every test module
*_test.ts, because the shards run explicit file lists and a test enforces the
naming convention.
Unit —
packages/<pkg>/tests/*_test.ts. One module in isolation, with fakes and the localpackages/core/tests/_assert.tshelper (never a third-party assert library). For a tool wrapper, assert the purebuildArgs()argv — do not run the real tool — and callassertWrapperConformancefrom@zuke/core/tooling/conformance, which asserts the wrapper's binary name, its declared resolution mode — theresolutionoption is required,"node_modules"for a JS-ecosystem tool and"path"for a native one, so every wrapper states its mode rather than inheriting a default that could hide a missingdefaultResolution()— and itsToolNotFoundErrorpath, so a wrapper cannot silently omit those checks. This layer covers a module's branches and a wrapper's flags, and carries the bulk of the 95% coverage gate.Integration —
tests/integration/*_test.ts. Drive a real build end-to-end through the CLImain()entry point using the harness intests/integration/_harness.ts:runCli(BuildClass, args)returns{ code, out, err }, andwithStateDir(fn)provides an isolated temporaryZUKE_STATE_DIRfor durable-state features (waitsFor,lock, run records). Fixtures are smallBuildsubclasses defined inside the test, recording execution into a local array. Prove the executor / graph / params / CLI / wait-resume-state flow works as a whole, not just a unit seam. These are ordinary*_test.tsfiles, so they run in the normaldeno testlane — everydeno task test/ci, on all three OSes (Ubuntu via ci.yml'scijob, macOS and Windows via itstestjob's matrix) — and count toward coverage.E2E —
tests/e2e/*_e2e.ts(+tests/e2e/fixtures/). For the one thing an in-process test cannot prove: genuine inter-process behaviour (e.g. two real processes racing a resume's compare-and-swap) and real OS boundaries (Windows file-locking). Spawn realdenosubprocesses withDeno.execPath()(guideline 5) against a tempZUKE_STATE_DIR; the fixture is a runnableBuildending inawait run(...). Name these files*_e2e.tsso defaultdeno testdiscovery skips them — they stay out of the fast gate. They run only via theintegrationbuild target inzuke.ts, which the generated.github/workflows/integration.ymlfans out over the three OS runners. That target globstests/e2e/*_e2e.ts, so a new file is picked up on its own — there is no list to add it to.
Naming wrinkle to keep straight: the in-process suite lives in
tests/integration/ but runs in the normal test lane; the build target named
integration runs the e2e suite. They are different things.
Adversarial review (every feature)
Every feature ships an adversarial review before the PR is finalized — not just a green gate. After the implementation and its tests pass, run a review pass that actively tries to break the change: bypasses, leaks, race conditions, unhandled throws, and untested security branches. Have independent reviewers attack each dimension, verify every finding against the real code (reproduce the exact path — default to refuted if you can't), then fix the confirmed defects and add a regression test for each before opening the PR.
This is not optional polish: on the MCP authz/audit work an adversarial pass caught a real authorization bypass, a secret-redaction gap, and a transport-crashing throw that all passed lint, types, and 95%+ coverage. Fixing pre-PR beats churning through review findings. It complements — never replaces — the three test layers above and the "read every reviewer comment" rule below.
Commands
| Task | Command |
|---|---|
| Run tests | deno task test |
| Coverage + gate (95%) | deno task cov |
| Human-readable coverage table | deno task cov:report |
| Type-check everything | deno task check |
| Format / check formatting | deno task fmt / deno task fmt:check |
| Lint | deno task lint |
| Spell-check | deno task spell |
| Pre-commit gate (same as CI) | deno task ci / ./zuke ci |
Regenerate deno.lock |
deno task lock |
| Verify declared core floors | ./zuke coreFloorCheck (needs network) |
deno task ci is deno run -A --frozen zuke.ts ci — the exact gate the ci
job in ci.yml runs, so there is one gate, not a hand-maintained subset that
can drift from it. zuke.ts's ci target depends on: format
(deno fmt --check), lint (deno lint), spell (cspell), coverage
(type-check, then the test suite with the 95% coverage gate), coverageUpload
(skips locally without a CODECOV_TOKEN), apiDocsCheck, docLint,
snippetsCheck, examplesCheck, hclSyncCheck, pluginSyncCheck,
launcherSyncCheck, skillsCheck, graphDocCheck, pluginVersionCheck,
prBodyLint, actionPinCheck, security, and lockCheck. Read zuke.ts's
ci target for the current, authoritative list — this is a snapshot, not a
second source of truth.
The lock is part of the gate. Every entrypoint that loads zuke.ts — both
launchers (once a deno.lock exists, which in this repository is always) and
the root tasks — passes --frozen, so a run cannot quietly heal a stale
deno.lock by writing the resolutions it is missing. That mattered: a green
gate used to be able to mean "the lock resolves now that we fixed it" while
CI, whose checkout has the committed lock, failed with "The lockfile is out of
date". deno task resolves the workspace before running its command, so it can
still rewrite the lock ahead of a frozen run; lockCheck closes that from the
other side by failing if the run left the lock modified. When you deliberately
change a dependency, run deno task lock, review the diff, and commit the lock
in the same change.
Repository layout
deno.json # workspace root: tasks, fmt/lint config
packages/
core/ # @zuke/core — mod.ts, src/, tests/ (+ ./shell, ./tooling, ./tooling/conformance, ./render, ./conformance)
deno/ # @zuke/deno — DenoTasks
npm/ # @zuke/npm — NpmTasks
cmd/ # @zuke/cmd — CmdTasks (generic fallback)
… # + the rest: @zuke/cli, @zuke/docs, @zuke/ai, and tool wrappers (70 total)
tests/
integration/ # in-process: real builds via the CLI main() + _harness.ts
e2e/ # subprocess: *_e2e.ts + fixtures/ (run by the `integration` target)
examples/ # cloneable mini projects, type-checked and listed by `examplesCheck`
zuke.ts # Zuke's own build (runnable example)
build/ # reusable helpers behind zuke.ts's targets (docs, publish, snippets, …)
zuke, zuke.ps1 # bootstrap launchers (install Deno, run the build) — GENERATED from packages/cli/src/launcher.ts by `./zuke launcherSync`; zuke.json names the build class
docs/ # long-form guides (linked from the README)
skills/ # agent skills: zuke-write-build, zuke-setup
plugins/zuke/ # Claude Code + Codex plugin wrapping the skills
gemini-extension.json # Gemini CLI extension manifest (serves skills/)
.agents/plugins/ # Codex-native marketplace catalog
.github/workflows/ci.yml # PR checks (ci gate, coreFloorCheck, test matrix)
.github/workflows/integration.yml # e2e suite on the OS matrix (generated)
.github/workflows/ai-review.yml # @zuke/ai PR review
.github/workflows/release.yml # release-please automation
.github/workflows/scorecard.yml # OpenSSF supply-chain scorecard
.github/workflows/security.yml # security scanners
.github/workflows/codeql.yml # CodeQL static analysis (SAST)
Architecture notes
- Targets are class fields. Dependencies are passed as
this.xreferences, not strings, for compile-time safety and rename support. Because class fields initialise top-to-bottom, a target may only depend on siblings declared above it — a forward reference isundefinedand is reported as an error byvalidateReferences. - Naming is recovered by
discoverTargets, which introspects the instance's own enumerable properties after construction. - Ordering is a DFS topological sort in
graph.tsthat also honours the softbefore/afterhints and detects cycles (reporting the path). - The shell
$tokenises interpolated values into discrete argv entries (never a concatenated shell string), so command construction is injection-free. - The global
zukecommand forwards to the project's build.@zuke/clikeepssetup,import,doc,upgrade,--helpand--versionfor itself and forwards everything else to the nearestzuke.jsonabove the working directory, running thezuke.tsbeside it exactly as./zukewould. The walk-up discovery is the accepted design (#578) — it is how npm, Deno and git find their roots — bounded by a trust gate modelled on git'ssafe.directory(packages/cli/src/dispatch.ts). Review the gate's implementation; the forwarding itself is not a finding. - Tool wrappers (
@zuke/deno,@zuke/npm,@zuke/cmd) follow a settings-lambda style. Settings classes extendToolSettingsfrom@zuke/core/tooling;buildArgs()must stay pure (no I/O) so argv construction is unit-testable. Execution reusesCommandfromshell.ts. New wrapper packages are workspace siblings that depend only on core (the rich feature packages listed inPACKAGE_DEPENDENCIESaside — see guideline 12).
Good open-source practices to follow
Every change starts with an issue. Feature, bugfix, documentation, refactor, or chore — file the issue first, then open the pull request that closes it. The issue is where the problem, the proposed shape, and the acceptance criteria are agreed before the effort is spent, and it is the trail that explains a change to whoever reads it a year later. Use the templates in
.github/ISSUE_TEMPLATE/:feature_request.yml(feat: …) for a new capability,bug_report.yml(bug: …) for something not working as documented, andchore.yml(chore: …) for docs, tests, refactoring, and repository work. Blank issues are disabled on purpose, so pick the closest template rather than skipping the step. The PR body then links it withCloses #<n>. This applies to agent-authored work exactly as it does to a human's: an agent that is asked to implement something files the issue as its first step, and never opens a PR that closes nothing.Small, focused changes with clear, descriptive commit messages (imperative mood; explain the why). Keep PRs reviewable.
Conventional, semantic versioning for releases; keep a changelog as the project grows.
PR titles are the release trigger — make them conventional commits. This repo always squash-merges, so the squashed commit's subject is the PR title, and that single subject is the only thing release-please parses for the merge. A title that is not a conventional commit (e.g.
Add announce tasks) is silently ignored — no version is bumped and no release PR is cut. Title every PRtype(scope): summaryso the squash carries the right artifact:feat(core): …for a new feature (minor bump),fix(deno): …for a fix (patch). The scope is cosmetic; release-please attributes the bump to a package by the files the PR changes underpackages/<name>/, so a PR that should release a package must touch a file under that package's path with afeat/fixtitle. (docs/chore/refactor/testtitles never bump.)Keep code snippets out of commit message bodies. release-please parses every merged commit with a strict conventional-commits parser, and a code fragment containing parentheses (e.g. an arrow function) makes it fail to parse the whole commit — which silently drops it from the release, so no version is bumped. The repo squash-merges, so the squash body comes from the PR description/commits: put illustrative code in the PR discussion, and keep commit bodies to prose. See
RELEASING.md.A new package must be added everywhere. Membership is declared in six places that must stay in lock-step: the
deno.jsonworkspace,.release-please-config.json,.release-please-manifest.json, thePACKAGESarray inbuild/packages.ts(the JSR publish loop), the package table inREADME.md, and the landing-page catalogue inbuild/website_tools.ts(TOOL_GROUPSfor a CLI wrapper,CORE_PACKAGESfor an engine or plugin package).tests/release_config_test.tsimportsPACKAGESrather than keeping its own copy, sobuild/packages.tsis the single list the tests compare everything else against.tests/release_config_test.tsandtests/build_tools_test.tsenforce that all six agree — run them after adding a package. Register a new package at version0.0.0— in.release-please-manifest.jsonand itsdeno.jsonalike. release-please reads the manifest as the last released version, so anything but0.0.0makes it bump from there: a package added at1.0.0is first released as1.1.0, and1.0.0never exists. At0.0.0the first release is1.0.0, andpublishJsrskips the package until then.tests/release_config_test.tsfails on a package with noCHANGELOG.mdthat is not at0.0.0. Omittingzuke.tsmeans the package is released but never published; omitting theREADME.mdtable means it is invisible to anyone browsing the repo; omittingbuild/website_tools.tsfails the gate, because the website's package grid is generated from it bysyncWebsite.Update docs with code. If behaviour changes, update
README.md, JSDoc, and the spec/acceptance criteria in the same PR.The agent skills are docs too — and they ship to a marketplace.
skills/is the source of truth forzuke-write-buildandzuke-setup, published to three harnesses:plugins/zuke/is the Claude Code plugin (whose manifests Codex also reads, alongside the Codex-nativeplugins/zuke/.codex-plugin/plugin.jsonand.agents/plugins/marketplace.json), and the rootgemini-extension.jsonmakes the repo a Gemini CLI extension that auto-discoversskills/. TheskillsCheckgate target validatesskills/against the Agent Skills spec (frontmatternamemust match the folder), since Codex and Gemini load those folders directly. Any change to the authoring surface or to a documented guarantee — a newtarget()method, a newBuildoverride, changed CLI or authorization semantics — must be reflected inskills/zuke-write-build/SKILL.mdandskills/zuke-write-build/references/cheatsheet.mdin the same PR. The cheatsheet is one of the two canonical answers to "does a wrapper exist?", so a new package belongs in its catalogue table as well. Then, in order:- Run
./zuke pluginSyncto regenerateplugins/zuke/skills/. Never hand-edit the copies —pluginSyncCheckfails on drift. - Bump the plugin version by hand, in all four manifests:
plugins/zuke/.claude-plugin/plugin.json,plugins/zuke/.codex-plugin/plugin.json, the entry in.claude-plugin/marketplace.json, and the rootgemini-extension.json(theVERSIONED_MANIFESTSlist inbuild/plugin_version_check.ts). Clients use the version to decide whether an installed plugin is stale, so skills edited without a bump simply never reach agents that already hold the old copy. release-please does not manageplugins/— it is not a workspace package and has nodeno.json. Additive skill content is a minor bump; a correction is a patch.
Two gate targets hold this up, so a miss fails the build rather than shipping quietly:
pluginVersionCheckfails when a published skill changed against the base branch and the version did not move up, andtests/plugin_manifest_test.tsfails when the manifests disagree.pluginVersionCheckis the one part of the gate that needs history — it compares againstorigin/<PR base>, orZUKE_PLUGIN_BASE_REFwhen you set one — and it reports itself skipped, never passed, in a local clone that has no base to compare against. On CI a skip is fatal, because a gate that cannot run is not a gate: it went unnoticed for months that the job's shallow checkout left it with no base ref at all.Two things it insists on beyond "the version differs". It must go up, so that resolving a version conflict by keeping the lower number is refused. And on a push to master it compares the merge commit against its parent (
ZUKE_PLUGIN_BASE_REF=HEAD^), which is the only place a collision is visible: two branches that both bump1.2.0to1.3.0merge without a conflict — each side made the identical edit — and neither pull request's check ever saw the other, because GitHub does not re-run a PR's checks when its base moves. When you have several skill-touching PRs open at once, give each a distinct version, or bump once more after the last one lands.- Run
Always read the reviewer comments on every PR. This repo runs AI reviewers (
@zuke/ai) that post their assessments as PR comments (and human reviewers do too). Before considering a PR done — and again after each push — fetch and read every review comment on it (the AI-review bot comments included), and address or explicitly respond to each finding. Don't rely on the checks being green alone; a passing gate can still carry comments worth acting on.Quote the finding's id whenever you answer or fix one. Each
@zuke/aifinding carries a short id (theDismiss a false positiveblock lists them, e.g.`m5aqoc5dxg5g`). Name it in the reply comment, and in the commit message of any fix it prompted. The id is how the reviewer's discussion feature anchors your reply: a maintainer comment quoting a finding's id is weighed as a rebuttal on the next run, and an accepted refutation stays dismissed instead of resurfacing. It is also what makes a reply attributable — the reviewers post in append mode, so every run's assessment stays on the thread as history, and the id ties a reply to the exact finding (and round) it answers, telling a genuinely new finding apart from the same concern reworded. The ids in thesuppressions(...)list inzuke.tsare the same identifiers, used there as the hard override for cross-branch false positives.No secrets or machine-specific paths in the repo or commits. Don't commit coverage artifacts (
cov_profile/,cov.lcov) — they're git-ignored.Deterministic output. Topological order is declaration-stable; keep it that way so
graph/--listoutput doesn't churn.Friendly errors. Validation failures should name the offending target and explain the fix (see the cycle and forward-reference messages for the bar).
Don't expand the public API casually. Internal fields use a trailing underscore (
name_,dependsOn_); only add tomod.tsdeliberately. When a type does belong in a public signature, though, export and document it rather than leaving it an undocumented private-type reference (see guideline 4).
Xet Storage Details
- Size:
- 40.8 kB
- Xet hash:
- 4e0f66c511983cf913c425f68c95f97d126ed9b719cf44148dd629eae51ef775
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.