ShtukbaseStandard

Harnesses

harness · version 0.1.0
Harnesses1 norm1 check

The shared part of harnesses: an agent page becomes one run of an agent CLI (Claude Code, Codex, OpenCode, DeepSeek Harness, Hermes), with a timeout, in the project folder, logged to the run log; a check that an agent on a harness can be run without a person.

About the package

A harness is the program an agent works in: Claude Code, Codex, OpenCode, DeepSeek Harness, Hermes. Each has a run without a person: give a task, get an answer, the program exits. This package is the shared part. The packages harness-claude, harness-codex, harness-opencode, harness-dsh, harness-hermes are thin adapters: how to build the command of their CLI.

One command

shtuk run harness-<name> ask --agent /agents/<agent>.md [--prompt "text" | --prompt-file file] [--dry-run] [--minutes N]
shtuk run harness ask --agent /agents/<agent>.md ...     # the same; the harness package is taken from the agent's runtime

What ask does:

  1. Reads the agent page and builds the prompt: the agent's instruction (the page body or the file instructions), then the task from --prompt or --prompt-file.
  2. Builds the CLI command: the model, the rights, the network, interactivity turned off.
  3. Writes the run to the log /runs (package runs): status: running.
  4. Starts the CLI in the agent's working folder (by default the project root) with a time limit limits.minutes (10 minutes if not stated).
  5. Writes the output to /runs/logs/<run>.log and completes the run: done with proof (the log and the last line of the answer) or failed with a reason.
  6. Prints the run address and the agent's answer. The exit code is the CLI's code (124 means it did not finish in time).

--dry-run prints the command, the folder, the rights and the prompt. It runs nothing and writes nothing.

The agent page

type: Worker
title: "Writes a note"
runtime: claude        # the harness: claude | codex | opencode | dsh | hermes (the field harness works too)
model: haiku           # the harness model
access: write          # read: only read; write: read and write inside the project
network: false         # network for the agent; none by default
workdir: /notes        # the working folder from the project root; the root by default
instructions: /agents/prompts/notes.md   # optional; otherwise the instruction is the page body
limits: {minutes: 5}

The default rights are safe: files only inside the working folder, no command line, no network. What a CLI cannot hold, the harness package says honestly, in its page and in a "warning" line in the dry run.

How a blueprint sets up a scheduled agent

It needs the packages agents, automations, runs, harness, a harness package (for example harness-claude) and schedule. Two pages:

# /agents/digest.md
type: Worker
title: "Day digest"
runtime: claude
model: haiku
access: write
limits: {minutes: 5}
---
You write a short digest in notes/digest.md. Only this file.
# /automations/digest-daily.md
type: Automation
title: "Digest every morning"
trigger: {kind: schedule, cron: "0 7 * * *", tz: UTC}   # or every: 6h, or at: "07:00"
reaction: {agent: /agents/digest.md, prompt: "Make the digest for yesterday."}
limits: {perHour: 1, perDay: 1}
mode: auto

To check: shtuk check (norms AGT-R01, HRN-R01, ACT-R02, SHD-R01). To see the command: shtuk run harness ask --agent /agents/digest.md --dry-run. To run a tick by hand: shtuk run schedule tick --now 2026-11-29T07:00:00Z. To turn the schedule on in the system: shtuk run schedule cron or launchd; the owner turns on the line or the plist.

The norm

HRN-R01 says an agent on a harness can be run without a person: the harness package is installed, the model and the rights (access) are written, and the working folder and the instruction file are inside the project. The enforcer is the agent check.

For a harness package

An adapter is the file adapter.ts: an Adapter object from lib/harness.ts (id, bin, defaultModel, install, build(spec) → command). The ask action is two lines: ask(adapter, argv). The sensor is sensor(adapter): the CLI is found and answers --version; if not, a warning, and the check does not fail.

Boundary: the schedule is the package schedule; which agent does which work and on which model is a project rule, not a package rule. The packages neither read nor write keys and tokens: signing in to a CLI is the owner's job.

Norms 1

IDNormLevelModeEnforcer
HRN-R01
An agent on a harness has a harness package installed, a model and rights written; the working folder and the instruction file are inside the project
SHOULD blocks
check

"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.

Actions 2

NameWhat it doesFileWhen
askRun an agent on its harness (by the runtime field)actions/ask.ts
shtuk run
agentAn agent on a harness has a harness package, a model and rights
norm HRN-R01
checks/h01_agent.ts
check

shtuk check runs the checks; shtuk run harness <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.

Pages 1

They go into the project at these paths.

Package files 4

They go into .shtukbase/packages/harness/; actions run from there.