Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zstack",
"version": "0.21.2",
"version": "0.22.0",
"description": "Evidence-driven engineering workflows, scoped agents, and task-sized verification for Claude Code.",
"author": {
"name": "Zach Fuller",
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zstack",
"version": "0.21.2",
"version": "0.22.0",
"description": "Evidence-driven engineering workflows, scoped agents, and task-sized verification for Codex.",
"author": {
"name": "Zach Fuller",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ These commands use the merged default branch. See [Hermes setup](docs/hosts/herm

### Linked installation

Keep this checkout where its links can remain valid. uv runs the Python 3.14+ installer and structural validator, resolving their inline dependencies (Rich for output, markdown-it-py for source-link parsing, and PyYAML for validation). Node.js 22.18+ (23.6+ on the 23 line) runs the repository integration tests, because the statechart suites are TypeScript. The optional orchestration, PR watcher, plan validator, and worktree audit use uv-managed Python 3.12+ and the standard library. Session hooks use the standard library on Python 3.11+: Codex and Claude Code launch them through uv with its default Python, and Hermes loads them in its own interpreter. Install missing tools with mise or brew.
Keep this checkout where its links can remain valid. uv runs the Python 3.14+ installer and structural validator, resolving their inline dependencies (Rich for output, markdown-it-py for source-link parsing, and PyYAML for validation). Node.js 22.18+ (23.6+ on the 23 line) runs the repository integration tests, because the statechart suites are TypeScript. The optional PR watcher, plan validator, and worktree audit use uv-managed Python 3.12+ and the standard library. Session hooks use the standard library on Python 3.11+: Codex and Claude Code launch them through uv with its default Python, and Hermes loads them in its own interpreter. Install missing tools with mise or brew.

From this checkout, preview and then apply the selected personal installation:

Expand Down Expand Up @@ -121,7 +121,7 @@ Herdr can launch a requested supported agent CLI with its own configuration; ind
uv run scripts/validate.py
node --test scripts/*.test.mjs
uv run --with rich --with pyyaml python -m unittest discover -s scripts -p 'test_*.py'
uv run --with ty ty check skills/z-mode/scripts --extra-search-path skills/z-mode/scripts/orch --extra-search-path skills/z-mode/scripts/watch-pr
uv run --with ty ty check skills/z-mode/scripts --extra-search-path skills/z-mode/scripts/watch-pr
uv run --with mypy --with rich --with pyyaml --with types-pyyaml mypy
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## First-time setup

Install Git, [uv](https://docs.astral.sh/uv/), and the host you intend to use: Codex, Claude Code, or Hermes Agent. Use mise or brew for missing tools. The installer requires Python 3.14+; `uv run` resolves that version and its inline Rich dependency. Node.js 22.18+ (23.6+ on the 23 line) is needed for repository integration tests, whose statechart suites are TypeScript; Node.js 20+ builds the documentation site. The bundled plan validator, worktree audit, orchestration CLI, and PR watcher use uv-managed Python 3.12+ and the standard library. Session hooks use the standard library on Python 3.11+: Codex and Claude Code launch them through uv with its default Python, and Hermes loads them in its own interpreter.
Install Git, [uv](https://docs.astral.sh/uv/), and the host you intend to use: Codex, Claude Code, or Hermes Agent. Use mise or brew for missing tools. The installer requires Python 3.14+; `uv run` resolves that version and its inline Rich dependency. Node.js 22.18+ (23.6+ on the 23 line) is needed for repository integration tests, whose statechart suites are TypeScript; Node.js 20+ builds the documentation site. The bundled plan validator, worktree audit, and PR watcher use uv-managed Python 3.12+ and the standard library. Session hooks use the standard library on Python 3.11+: Codex and Claude Code launch them through uv with its default Python, and Hermes loads them in its own interpreter.

Clone the library to a stable location, then run all installer commands from that checkout:

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/04-long-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Give [autonomous-run](../../skills/z-mode/playbooks/autonomous-run.md) a checkab
Native background or scheduling features can be used when verified and requested; this library supplies no replacement daemon.
:::

[Orchestrate](../../skills/z-mode/playbooks/orchestrate.md) coordinates workers around owned task state, using native execution by default or [Herdr when explicitly enabled](herdr.md). [show-me-your-work](../../skills/show-me-your-work/SKILL.md) keeps an append-only TSV trail.
[Orchestrate](../../skills/z-mode/playbooks/orchestrate.md) is for a program that outlives any single agent. The coordinator decides which agent does each piece of work, checks what each one produces, and never writes code itself. It uses native execution by default or [Herdr when explicitly enabled](herdr.md). [show-me-your-work](../../skills/show-me-your-work/SKILL.md) keeps an append-only TSV trail.

## Earn trust before unattended work

Expand Down
10 changes: 10 additions & 0 deletions docs/provenance.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Upstream provenance

## Native-tool Orchestrate — 2026-10-28

Adapted pstack 0.15.36 from [PR #1043](https://github.com/cursor/plugins/pull/1043), merged at `c742dd61706fbacc1b95f1a20b7b988cf096ce6c` (head `b8fdac4934681f0aa6f7dbda3a583466f0809d4a`). The MIT license retains Lauren Tan's attribution.

Orchestrate is rewritten around the coordinator's own tools. Workers spawn through the selected execution method. State lives in the host's native task tracker where available and a short user-owned notes file. PRs are watched through native PR and CI event subscriptions where the host has them. The coordinator calls no bookkeeping scripts, runs no polling loops, and never writes code. The new Topology section gives each PR one owner, the only agent that pushes, rebases, or retargets it. It also covers fresh workers per independent task, sub-coordinators only for wide areas (at most three levels), forks for built state, a cross-family verifier per PR at its current head, and a pilot unit before fan-out. The Supervision section names evidence in every brief and reads diffs over summaries. It checks live PR state before reporting and retries stalled workers by cause.

Compatibility change: the Python orch CLI (`skills/z-mode/scripts/orch/orch.py`, `store.py`) and its store and frontier tests are deleted. Integrations that called it must keep their own state. Its validator, mypy, ty, and host-contract entries are removed.

Zstack keeps action authority. An owner pushes and merges only within the user's authorized actions and follows Shipping for merges. Without merge authority or an other-family verifier, the PR stops at merge-ready and the gap is reported. The verifier may run through the native-hosts other-provider route. Cursor's cloud VM default becomes host remote isolation where available and permitted. The Project tracker and store become the host's task tracker plus `.agent-work/<slug>/notes.md`. `control-ui` and `control-cli` become the project's verification harness. Per-agent reasoning and speed choices are dropped in favor of the delegation contract. Upstream's retries by cause are kept but limited to zstack's lifecycle rule. That allows one retry with a fresh agent and a corrected brief, and no unrequested model switch. Upstream's messaging of workers for follow-ups becomes reuse only for agent-held state; other fix rounds go to a fresh agent. Upstream's ten in-flight workers becomes an upper bound on the lifecycle window, which starts at 2-3. Shipping's child retarget and rebase go to the child's own owner. Herdr pane assignments and the pause-safely handoff for hosts without a durable runtime are retained. Generated harness copies, Cursor manifests, and `package.json` changes are excluded. Native manifests advance together to `0.22.0` because a bundled tool is removed. See [validation](validation.md#pstack-0-15-36) for actual checks and limits.

## Proven interrogation, cross-family judging, and operator-landed queues — 2026-10-27

Selectively adapted pstack 0.15.35 from [PR #986](https://github.com/cursor/plugins/pull/986), merged at `ab1f702ce8e8b6557edb56b09f52cde8bfb83f17` (head `357e07aa616a2211b2cc2c6d775ceff051c2fad4`). The MIT license retains Lauren Tan's attribution.
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/playbooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Invoke the installed mode explicitly: `$z-mode` in Codex or `/z-mode` in Claude

The mode remains active in conversation until stopped or replaced; it does not provide a scheduler. Simple work runs directly. Delegated workflows use native agents by default, or [Herdr execution](workflow-skills.md#herdr-workflow) when explicitly enabled for the session. Herdr applies alongside every playbook below, including its companions, rather than adding a separate route. Both paths preserve bounded concurrency, exclusive ownership, artifact verification, and action authority. Native settings are inherited; independently launched CLIs have their own configuration. Missing independent coverage must be disclosed. See the [mode source](https://github.com/fullerzz/agent-skills/blob/main/skills/z-mode/SKILL.md) and [execution contract](https://github.com/fullerzz/agent-skills/blob/main/skills/z-mode/references/native-hosts.md#execution-selection).

Bundled tools are optional capabilities, not a runtime supplied by the mode. Resolve the real installed skill directory, use quoted absolute script paths, and retain the target repository as cwd. Run the plan validator (`check_plan.py`), worktree audit (`worktree_audit.py`), PR watcher for GitHub and GitLab (`watch-pr/watch_pr.py`), and orchestration CLI (`orch/orch.py`) with `uv run`. They require Python 3.12+ and use the standard library without installing dependencies beside the skill scripts. The existing shell launchers forward to uv. Consult each tool’s usage guidance; forge access, native delegation and durable background execution are separate prerequisites.
Bundled tools are optional capabilities, not a runtime supplied by the mode. Resolve the real installed skill directory, use quoted absolute script paths, and retain the target repository as cwd. Run the plan validator (`check_plan.py`), worktree audit (`worktree_audit.py`), and PR watcher for GitHub and GitLab (`watch-pr/watch_pr.py`) with `uv run`. They require Python 3.12+ and use the standard library without installing dependencies beside the skill scripts. The existing shell launchers forward to uv. Consult each tool’s usage guidance; forge access, native delegation and durable background execution are separate prerequisites.

## Investigation {#playbook-investigation}

Expand Down Expand Up @@ -240,9 +240,9 @@ Codex: $z-mode Coordinate the parser and UI migration with exclusive owners and
Claude Code: /z-mode Coordinate the parser and UI migration with exclusive owners and verified handoffs.
```

Pin units and dependencies, pilot the brief, store user-owned state and receipts, run bounded native owners, wait for terminal reports, inspect artifacts, relay verified dependencies, and reconcile every child. Return counts, frontier, blockers, and state directory.
The coordinator decides which agent does each piece of work, checks what each produces, and never writes code. One owner per PR carries it from build to merge within the authorized actions; only the owner pushes, rebases, or retargets it. Each PR needs a verifier from another model family at its current head. Pilot one unit before fan-out, read diffs rather than summaries, and check live PR state before reporting. Return what landed, each PR's live state and verdict, what was dropped, and the decisions waiting on the user.

**Prerequisites and limits:** Needs native delegation; absent independent coverage must be disclosed. The optional Python orch CLI runs with uv and provides bookkeeping only; frontier reads the PR base chain with `gh` from the stacker's checkout. One coordinator owns topology, and no durable runtime means handoff.
**Prerequisites and limits:** Needs native delegation. State lives in the host's task tracker where available and a user-owned notes file; PR watching uses native event subscriptions where the host has them. No bundled bookkeeping CLI remains. Without an other-family verifier or merge authority, a PR stops at merge-ready. No durable runtime means handoff.

[Supporting playbook](https://github.com/fullerzz/agent-skills/blob/main/skills/z-mode/playbooks/orchestrate.md).

Expand Down
16 changes: 16 additions & 0 deletions docs/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ outline: [2, 3]

# Validation

## pstack 0.15.36 Orchestrate port — 2026-10-28 {#pstack-0-15-36}

Rewrote Orchestrate around native delegation, host task trackers, and PR/CI event subscriptions. The Python orch CLI and its store and frontier tests are deleted. Shared native manifests are `0.22.0`. Checks ran on macOS in Claude Code.

- `uv run scripts/validate.py`: 57 skills, zero structural problems. Python unittest discovery: 143 tests passed. The 10 fewer than the previous 153 are the deleted orch store, CLI, and frontier tests. The watcher launcher test still runs.
- `node --test scripts/*.test.mjs` on Node `24.22.1`: 212 passed, zero failed, 61 skipped. `git diff --check` passed.
- `ty check` on `skills/z-mode/scripts` without the orch search path: all checks passed. Project mypy reports one `arg-type` error in `scripts/test_pr_watcher.py:746`. It reproduces identically on an untouched worktree of base `7f8b9aa`.
- A tracked-file scan finds no remaining caller of `scripts/orch`, `orch.py`, or `store.py`. Older validation and provenance entries and the adaptation plan still name it as history.
- An interrogate run used three native Claude Opus 5.5 adversaries, so all came from the same provider. The Codex seat was skipped: its sandbox blocked the uv cache with `Operation not permitted`, and an isolated cache failed with `error resolving DNS`. Four findings were verified by lead reruns of the adversaries' probes in a fresh worktree. Each was a playbook rule copied from upstream that contradicted `native-hosts.md`:
- two retries with the same brief and a different model;
- messaging an existing worker for any follow-up;
- a fixed ten-worker window;
- Shipping having the parent's owner rebase and retarget a child PR.
All four are fixed in the playbook. One more finding, no PR-watch path without native subscriptions, was dropped: the no-polling rule binds only the coordinator, and owners keep Babysit.
- No live Orchestrate program, sub-coordinator, cross-family verifier, or native PR event subscription was exercised. The playbook was reviewed statically against the native host contract.

## Claude sandbox startup requirement — 2026-10-28

PR #71's writing-seat settings now include `sandbox.failIfUnavailable: true`, following the [Claude sandbox startup documentation](https://code.claude.com/docs/en/sandboxing#get-started). Unavailable sandboxing is a coverage gap; a retry outside the host sandbox must retain the CLI's own sandbox settings. Shared manifests are `0.21.2`.
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mypy]
files = __init__.py, scripts, hooks, skills/z-mode/scripts
mypy_path = $MYPY_CONFIG_FILE_DIR/scripts,$MYPY_CONFIG_FILE_DIR/skills/z-mode/scripts/orch,$MYPY_CONFIG_FILE_DIR/skills/z-mode/scripts/watch-pr
mypy_path = $MYPY_CONFIG_FILE_DIR/scripts,$MYPY_CONFIG_FILE_DIR/skills/z-mode/scripts/watch-pr
explicit_package_bases = True
check_untyped_defs = True
strict = True
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: zstack
version: 0.21.2
version: 0.22.0
description: Evidence-driven engineering skills and task-sized verification for Hermes Agent.
author: Zach Fuller
license: MIT
Expand Down
1 change: 0 additions & 1 deletion scripts/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def setUp(self) -> None:
"skills/z-mode/scripts/worktree-audit.sh",
"skills/z-mode/scripts/worktree_audit.py",
"skills/z-mode/scripts/watch-pr/watch_pr.py",
"skills/z-mode/scripts/orch/orch.py",
"skills/show-me-your-work/scripts/log.sh",
):
self.write(relative, "").chmod(0o755)
Expand Down
Loading
Loading