@yorkay11/harness-cli
v0.1.1
Published
Scaffold the Node agent harness into a project (init, doctor, gate, merge package.json) plus HarnessEvent adapters.
Readme
@yorkay11/harness-cli
Scaffold the agent harness into a Node project.
Usage (from this monorepo root)
npm run cli:build
npm run harness -- init --dir /path/to/project
npm run harness -- init --dir /path/to/project --profile node-library
npm run harness -- doctor --dir /path/to/project
npm run harness -- gate --dir /path/to/project
npm run harness -- gate --dir /path/to/project --ciCommands
| Command | Description |
|---------|-------------|
| harness init [--dir PATH] [--profile NAME] [--dry-run] [--force] [--with-hooks] | Copy template; merge package.json. Optional Git pre-commit → npm run harness:gate. |
| harness doctor [--dir PATH] | Verify harness files and scripts (exit 1 on errors). |
| harness gate [--dir PATH] [--ci] | Fast: validate features.json + doctor. With --ci, also runs npm run health (CI sentinel). |
Templates add npm scripts harness:gate and harness:check (gate --ci) and a devDependency on this package so npx harness / npm run harness:gate work after npm install.
Profiles
| Profile | Purpose |
|---------|---------|
| node-default | Generic harness (default). |
| node-library | Library-oriented package.json (files, sideEffects, …). |
| node-app | App-oriented placeholders (dev, build scripts). |
Cursor
Each profile ships .cursor/rules/harness.mdc with alwaysApply: true so Cursor loads the harness loop (read AGENTS.md, PROMPT.md, tail of agent-progress.txt, pick one features.json item with "passes": false) without relying on manual @ mentions. Delete or tweak the file if it does not fit your team.
Programmatic imports (orchestration)
After npm install @yorkay11/harness-cli, Node can import the event contract and GitHub adapter:
import { githubToHarnessEvent, type HarnessEvent } from "@yorkay11/harness-cli/orchestration";Published files include dist/orchestration/* (see package exports).
Publish (later)
cd packages/cli
npm pack
# npm publish --access publicPublished scope: @yorkay11/harness-cli (see package.json name).
