# dvn skill invocation packet

Skill: public/programmatic-harness
Status: CURRENT
Age: 1 seconds; source check: verified

- devin-thomas/skills @ dce5977166216e8e88fcf56b6b53c76aaf91be5c; verified 2026-10-24T06:06:12.085Z

Main source: programmatic-harness/SKILL.md
Main Git blob: c014b492d5901d5f1bc529dacba8a6de36519888

---
name: programmatic-harness
description: Set up and prove an explicitly requested local coding-agent harness with a bounded resumable session and nonsecret evidence.
---

# Programmatic Harness

Use this skill only after the learner opts in to controlling a coding-agent session from code. Installing this skill changes no project dependencies and configures no credentials. Declining or stopping leaves the caller's workflow available.

## Codex local route

Codex local is the implemented route in this release. Cursor is deferred until its adapter and native acceptance evidence are available; do not imply that Cursor works. Codex cloud is unsupported here. A separate future cloud adapter would require its own explicit opt-in and proof.

1. Confirm Node.js 22+, an installed Codex CLI, an absolute disposable workspace, and the user's own eligible Codex managed ChatGPT sign-in. If Codex is absent, offer the official Codex installation/login handoff. Do not request an API key or suggest enabling OpenAI Platform billing for this route.
2. Explain that the caller will explicitly install `@uppercut-labs/agent-native` in the disposable proof project. The skill installer does not do this. No credentials are copied, created, or logged.
3. Install a pinned Agent Native release in that disposable project using the npm release if available. Otherwise use the pinned public release asset and verify its adjacent SHA-256 file before installation; see [Codex setup](references/codex.md). Do not install from an unpinned branch or add a dependency to the learner's application by default.
4. Run the packaged `scripts/codex-proof.mjs` only when the learner asks to run the proof. It creates its own temporary workspace, makes two fixed turns, closes and resumes the same opaque session reference, checks exact file contents, and removes the workspace.
5. Report only the fixed evidence fields emitted by the script: adapter version, provider, target, model, turn results, content checks, and cleanup result. Omit session IDs, tokens, account responses, environment values, raw event messages, and provider exceptions.
6. On failure, report the stable failure category and one useful recovery action. Authentication problems go to `codex login`; unavailable CLI goes to the official Codex installation route; an interrupted/incomplete second turn is partial, never passed. Cleanup failures must be visible and must not be reported as successful cleanup.

The adapter uses Codex's managed ChatGPT account path and rejects API-key account mode; it does not provide an API-billed fallback. Model availability and plan eligibility are controlled by Codex. Token usage events are cumulative snapshots; never add them together as a cost estimate.

See [Codex setup](references/codex.md) and [proof and evidence](references/proof-and-evidence.md). Technical lifecycle semantics live in [Agent Native's Codex harness reference](https://github.com/uppercut-labs/agent-native/blob/main/docs/harness-codex.md).


---

Supporting source: programmatic-harness/references/codex.md
Git blob: 604131e9fcd97b79fb7d6e2bc8019f65509ba2e2

# Codex local setup

## Eligibility and opt-in

Use Node.js 22 or newer and an installed Codex CLI. Sign in through Codex's managed ChatGPT account flow with `codex login`. The harness checks that the account is managed by ChatGPT without refreshing or printing credentials. API-key account mode is rejected; there is no API-billing fallback. Never copy Codex credential files, ask for an API key, or include account details in logs.

The learner explicitly opts in before installing Agent Native or running inference. Keep the proof in a disposable project/workspace. Skill installation and catalog operations do not install Agent Native into the host project.

## Install pinned releases

Install the skill CLI from its versioned GitHub release tarball so the command knows this catalog ID and the bundled skill provenance is fixed. Download the archive and adjacent checksum file, compare SHA-256, then run the verified CLI tarball through npm's temporary package runner:

```sh
curl -fL -o uppercut-labs-skills-0.1.1.tgz https://github.com/devin-thomas/skills/releases/download/v0.1.1/uppercut-labs-skills-0.1.1.tgz
curl -fL -o uppercut-labs-skills-0.1.1.tgz.sha256 https://github.com/devin-thomas/skills/releases/download/v0.1.1/uppercut-labs-skills-0.1.1.tgz.sha256
shasum -a 256 -c uppercut-labs-skills-0.1.1.tgz.sha256
npm exec --yes --package=./uppercut-labs-skills-0.1.1.tgz -- uppercut-skills add programmatic-harness --host codex --project "$PWD"
```

This installs skill content only; the temporary CLI does not add dependencies to the host project. On Linux, use `sha256sum -c` in place of `shasum -a 256 -c`. Stop if the checksum is missing or does not match. Never substitute a branch archive or an unchecked tarball.

The learner separately opts in to install Agent Native 0.1.1 in a disposable project:

```sh
npm install --save-exact @uppercut-labs/agent-native@0.1.1
```

If the registry release is unavailable, fetch and verify the adjacent checksum for the exact public release asset before installing it:

```sh
curl -fL -o uppercut-labs-agent-native-0.1.1.tgz https://github.com/uppercut-labs/agent-native/releases/download/v0.1.1/uppercut-labs-agent-native-0.1.1.tgz
curl -fL -o uppercut-labs-agent-native-0.1.1.tgz.sha256 https://github.com/uppercut-labs/agent-native/releases/download/v0.1.1/uppercut-labs-agent-native-0.1.1.tgz.sha256
shasum -a 256 -c uppercut-labs-agent-native-0.1.1.tgz.sha256
npm install --save-exact ./uppercut-labs-agent-native-0.1.1.tgz
```

The verified Agent Native 0.1.1 release asset SHA-256 is `a1ce884f89eadba319d6fbad5c9b09b05575a7ab15998bcfd4a6ad8cc8228fbb`.

## Run the fixed proof

From the disposable project with the package installed:

```sh
node ./codex-proof.mjs --model gpt-5.6-luna --name Codex
```

From the disposable project root, copy the skill's script and run it:

```sh
cp .agents/skills/programmatic-harness/scripts/codex-proof.mjs ./codex-proof.mjs
node ./codex-proof.mjs --model gpt-5.6-luna --name Codex
```

The script uses `createCodexHarnessAdapter({ model, effort: 'low' })`, opens an explicit local temporary workspace, writes and verifies `hello world`, closes its owned session process, resumes the same session through a fresh adapter and checks the exact session reference, writes and verifies `hello Codex`, then closes and removes the workspace. It requires Agent Native 0.1.1. Model selection is explicit; choose a model available to the user's Codex account. The example model reflects the verified runtime evidence, not a current availability guarantee.

Codex CLI 0.145.0 exposes `codex exec --model <MODEL> --cd <DIR> <PROMPT>` for direct one-shot CLI work. This harness uses the supported app-server protocol through Agent Native instead, because it must preserve and resume a session; do not replace it with unrelated `codex exec` invocations.


---

Supporting source: programmatic-harness/references/proof-and-evidence.md
Git blob: 69afe1d7b7618a679c12dcc435b543a5db4807ec

# Proof and evidence

The canonical local proof has exactly two fixed prompts:

1. `Create proof.txt containing exactly: hello world`
2. `Replace world with <name>.`

The script accepts only a 1–32 character name made of ASCII letters, numbers, `_`, or `-`. It checks the exact normalized contents after each turn, requires terminal `completed` events, closes the first owned process before resuming the same opaque session ID, and checks the final contents. A first-turn pass followed by resume failure is partial, not passed.

Successful output is a JSON record containing only provider, target, adapter version, model, completed turn count, content checks, and cleanup status. It contains no prompts beyond the fixed proof, session/turn identifiers, credentials, raw tool/event text, or exception detail. Failed runs exit nonzero and print a stable category; cleanup errors are surfaced.

Local proof says nothing about cloud sessions, Cursor, MCP configuration, or production authorization. A future cloud proof must be a separate opt-in and separately recorded outcome.
