Hey everyone,
Iāve published zcode-harness-template, a scaffold for using an engineering harness with AI agents in **ZCode/GLM**.
The core idea: Agent = Model + Harness. The model shouldnāt close a phase just because it āthinksā itās done; the harness forces it through deterministic checks, skeptical verification, and human approval.
Repo: https://github.com/o-r-h/zcode-harness-template
Thereās no global install: you clone the template and everything lives inside the project under `.zcode/`. Runtime state goes in `.harness/`, which is not versioned.
Features
- Full loop: ticket ā phases ā checks ā skeptical verification ā manual test script ā human `/fase-ok` ā lessons library.
- Workspace-scoped hooks: `PostToolUse` immediately returns `rules.json` violations to the model; `Stop` prevents the agent from ending the turn with a phase left half-done.
- Skeptic with isolated context: it receives the diff + success criteria, never the executorās conversation.
- Bounded retries: once exhausted, the phase is escalated and comes back to you.
- Versioned lessons library: the reflector proposes lessons; you decide with `/hallazgo-ok`, `/hallazgo-editar`, or `/hallazgo-no`. Approved lessons are read as hypotheses on the next ticket.
- Included commands: `/ticket-abrir`, `/fase`, `/fase-ok`, `/fase-fallo`, `/fase-pausa`, `/hallazgo*`, `/biblioteca-curar`, `/curacion-*`.
- Included agents: skeptic, reflector, and curator.
- Base Python profile:`rules.json` + `python_quality` checks with ruff + mypy + pytest via uv. Editable for your stack.
- Requirements: ZCode, Python 3.12+, and Git. Optional: uv and graphify. The harness is pure Python stdlib.
How it works, briefly
- `/ticket-abrir <requirement>` saves the requirement and generates `plan.md` + `plan.json`, validated by contract.
- `/fase fase_N` runs the phase, executes the checks, and if they pass, invokes the skeptic.
- If the skeptic approves, a manual test script is generated and the turn waits for your `/fase-ok`. No phase closes without a human.
- When the phase closes, the reflector proposes lessons; approved ones live in `.zcode/biblioteca/`.
Quick start
New project folder from the template
./deploy.sh --nuevo /path/to/my-project
Or install over an existing project
./deploy.sh /path/to/my-project
Then open ZCode in that folder in a new session and run /ticket-abrir.
Credits
This is a ZCode adaptation of harness-advance. The upstream is native to Claude Code; all the state, contract, and loop logic is theirs. This template re-homes it to ZCode. The exact diff is in docs/ADAPTACION.md.
If you try it, Iād love feedback: what stack you add, what rules/checks are missing, and whether the hooks behave as expected. Issues/PRs welcome.