Skip to main content

First session

This guide shows how to use the OpenCode runtime with the harness for the first time.

1. Audit the project​

Inside OpenCode, run:

/harness-init

This command inspects the project without modifying anything. It looks for:

  • Project instructions (AGENTS.md, CLAUDE.md).
  • Progress and feature state.
  • Verification and startup commands.
  • Skills, plugins, and security.

The result is a gap report — what exists, what is missing, and what would be created.

2. Install the full package (optional)​

If the project is new or you want to standardize it:

/harness-bootstrap

The bootstrap proposes a full package with explicit confirmation. It detects the project stack and shows each file as create, merge, or skip before writing.

3. Start the session​

Every productive session begins with:

/harness-session-start

It reads the state, the feature list, the previous handoff, and the verification command. At the end, it declares the active task:

Active task: feat-001 — Health endpoint. AC: curl /health returns 200.

4. Do work with PREVC​

For meaningful work:

/prevc prepare Add a health check endpoint

PREVC groups seven stages into four phases: Prepare (prepare + plan), Execute (execute), Validate (validate + judge), and Confirm (refine + confirm). Each phase stays within the approved scope.

5. End the session​

At the end, always run:

/harness-clean-handoff

It records what was done, what broke, and the next action. The next session reads these files and knows exactly where to continue.

Next step​

Read Why a harness? to understand the problem the harness solves.