Skip to content

Own the harness's behaviour here, in harness/ - #8

Open
TomProkop wants to merge 2 commits into
masterfrom
claude/agent-behaviour-config
Open

Own the harness's behaviour here, in harness/#8
TomProkop wants to merge 2 commits into
masterfrom
claude/agent-behaviour-config

Conversation

@TomProkop

@TomProkop TomProkop commented Aug 28, 2026

Copy link
Copy Markdown
Member

Adds a top-level harness/ directory holding how an agent harness should behave in a TALXIS workspace: the session-wide instructions and the session-start briefing, declared in harness/instructions.json (which names its payload files, so this repo owns its own layout).

Companion to TALXIS/tools-agentbox#35, which is updated to fetch these files instead of carrying its own copies.

harness/ rather than agent/: "agent" is already overloaded here — AGENTS.md, agent skills, coding agents — and agents/ is a plugin component directory in both harnesses (subagent definitions), so a root agent/ would read as adjacent to something it isn't. This directory configures the harness.

The boundary

This repo says how an agent should work. Which tools a box has, and installing or updating them, stays in tools-agentbox. Its provisioner fetches these files over HTTPS at startup and applies each to whichever harness the box runs — the instructions become managed memory or user-level custom instructions, the briefing becomes a session-start hook.

Deliberately not a plugin component

/plugin install does not deliver this, nothing under plugins/ is touched, and there is no version bump. A directory under plugins/ would be classified as a plugin by validate.mjs and forced to carry a marketplace entry, the Agent Plugins $schema and a semver version — so this sits at the root, next to scripts/. Both existing scripts only walk plugins/, so harness/ is inert to them, and the validate workflow has no path filter, so a PR touching only harness/ still produces a green required check.

Validation

scripts/validate.mjs grows a harness/ block, because nothing outside plugins/ was checked before and a typo here breaks provisioning for every new box:

  • harness/instructions.json parses, and declares at least one payload
  • each declared name is a plain .md filename that exists and is non-empty
  • a stray undeclared .md file in harness/ is an error
  • the payloads carry the same two rules the skills do: host-agnostic (no ~/.claude-style paths — this text reaches every harness), and zero toolchain prose (no installs or updates; that is txc doctor's job, T1)

Verified by breaking each rule in turn and confirming the specific error, then confirming a clean tree passes both gates: node scripts/generate-manifests.mjs --check && node scripts/validate.mjs.

One thing worth a reviewer's eye

The prompt this replaces (drafted in the agentbox PR) opened with a toolchain inventory — "txc, pac, dotnet are installed, never apt-get them". That is exactly the prose this repo keeps out of skills, and by the environment/know-how split it is agentbox's business, so it is not carried over. What moved is the behaviour: ask the CLI instead of guessing, credentials come from Valet and are never handled directly, source control is the record, production is opt-in, report outcomes honestly. If you want the environment facts asserted to the agent somewhere, agentbox is the place for them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KaKGKCwRPFoHcZkRJZxbn2

Adds `agent/`: how an agent harness should behave in a TALXIS workspace —
session-wide instructions and the session-start briefing — declared in
`agent/instructions.json`, which names its payload files so this repo owns its own
layout.

This is the process/know-how half of the setup. The environment half — which tools
a box has, and installing or updating them — stays in TALXIS/tools-agentbox, whose
provisioner fetches these files over HTTPS and applies each to whichever harness the
box runs: the instructions become managed memory or user-level custom instructions,
the briefing becomes a session-start hook.

Deliberately not a plugin component. `/plugin install` doesn't deliver it, nothing
under plugins/ is touched, and there's no version bump — a directory under plugins/
would be classified as a plugin by validate.mjs and forced to carry a marketplace
entry and a semver version. So it sits at the root, next to scripts/.

scripts/validate.mjs grows an agent/ block, since nothing outside plugins/ was
checked before and a typo here breaks provisioning for every new box: the manifest
parses, the files it declares exist and are non-empty, stray undeclared .md files are
rejected, and the payloads carry the same host-agnostic and zero-toolchain-prose
rules the skills do — installs and version checks are txc doctor's job, and what a
box has installed isn't something to assert in a prompt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaKGKCwRPFoHcZkRJZxbn2
TomProkop pushed a commit to TALXIS/tools-agentbox that referenced this pull request Aug 28, 2026
Splits the config along the line between the box and the agent: this repo owns the
environment, TALXIS/skills owns process and know-how.

src/agent/agent.json keeps what provisioning a box actually means — which plugin
marketplaces and plugins it gets — and gains an "instructions" pointer at the
behaviour config, which now lives in TALXIS/skills alongside the Skills it belongs
to (TALXIS/skills#8). The system prompt and initial message leave this repo.

configure-agent-harness.sh resolves in two stages. download_config already fetched a
manifest and resolved payload filenames against the URL curl landed on, which is
exactly what the second stage needs, so it splits into download_manifest (the
bootstrap) and download_instructions (the behaviour manifest plus its payloads).
Both stages fail loudly with the URL named: a box with a plugin list but no house
rules is half-configured, so an unreachable instructions manifest is as fatal as an
unreachable bootstrap one. AGENTBOX_INSTRUCTIONS_URL / AGENTBOX_INSTRUCTIONS_DIR
mirror the existing AGENTBOX_CONFIG_* pair.

Tests now drive a fixture in test/agent/fixture/ rather than the real config, so CI
covers the mechanism without reaching the network or depending on another repo —
which it otherwise would have to, now that half the config lives elsewhere. Adds a
case for unreadable instructions alongside the existing one for an unreadable
bootstrap manifest.

Unchanged: src/container/claude-code/session-start-hook.json and the README step for
it. Keeping txc and the Dataverse templates current is tool updating, so it stays an
agentbox concern rather than moving into the plugin.

Requires the talxis.com/agentbox-instructions short link, and TALXIS/skills#8 merged
first. Verified end-to-end against that PR's branch: behaviour fetched over the
network, applied, and reported present in a live Claude session's context.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaKGKCwRPFoHcZkRJZxbn2
"Agent" is already overloaded in this repo — AGENTS.md, agent skills, coding agents —
and `agents/` is a plugin component directory in both harnesses (subagent
definitions), so a root `agent/` read as adjacent to something it isn't. This
directory configures the harness, which is what the docs already called it.

Directory, manifest path, validation messages and both house-rule files renamed
together; no behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KaKGKCwRPFoHcZkRJZxbn2
@TomProkop TomProkop changed the title Own the agent's harness behaviour here, in agent/ Own the harness's behaviour here, in harness/ Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants