# Quality Contract Harness

> Turn a risky code change into an explicit quality contract and verify it against current-build evidence, so “done” means proven, not assumed.

Quality Contract Harness is a paid AI agent skill on Agensi by andan, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $19 (one-time purchase)
- Creator: [andan](https://www.agensi.io/creators/andan)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-11-25
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/quality-contract-harness
- Tags: testing, code-review, ai-agents, node-js, quality-assurance

## About this skill

**Stop shipping code that only looks finished.**

Quality Contract Harness plans a change-specific quality contract for the diff in front of you, then verifies completion against evidence from the current build — and nothing else. It is built for AI coding sessions, release gates and review handoffs, where the failure mode is a confident “done” that nobody actually verified.

### How it works
1. **Plan the contract.** The change (paths, flags, revision) and the approved dependency map decide which components are in scope and which checks apply — risk rules add what the change type demands, your specification adds the invariants that must not break.
2. **Bind the evidence.** Every check carries a binding such as `["r2","sandbox-app","custom-total","execution","spec:line-4","equals",5000]`. Evidence captured for another revision, build or scope cannot satisfy it.
3. **Verify and report.** The bundled deterministic engine returns pass / fail / blocked / unverified per check with the unresolved items spelled out. A plan never establishes completion; only current-build evidence does.
### What the report gives you
- Risk level and the exact component scope, including dependency fallout beyond the edited folder.
- Each gate with its source: `risk-rule:*`, `spec:*`, or `approved:dependency-map#<component>:<check>`.
- Counts of pass, fail, blocked and unverified, plus unexpected rows that do not belong to the contract.
- A plain statement of what is still unproven, so the next action is obvious.

### What is bundled
- `SKILL.md` with the host workflow, `references/quickstart.md` and the full `references/v2.md` contract reference.
- A deterministic engine (`scripts/engine.cjs`) that reads JSON on stdin and writes the report to stdout.
- An optional helper (`scripts/assist.cjs`) that prepares and binds inputs so you never hand-write JSON.
- Worked example input and output, so the first run needs no guesswork.
### Requirements
- Node.js 18 or newer.
- An agent host (Claude Code, Codex CLI, Cursor, and other SKILL.md agents) that can run a local Node script and read the project material you authorise.
- No API key, account or network access is needed by the bundled engine.

### Licence
Proprietary commercial-use licence: use it for your own, your employer's and your clients' authorised work. Redistribution, resale and sharing of the skill materials are not permitted.

## Requires

- Node.js

The engine reads JSON on stdin and prints the report to stdout. It makes no network calls and writes no files.

## Known limitations

Requires Node.js 18+. Cannot perform network requests or write to source files. Depends on authorized host tools to gather real project observations.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Quality Contract Harness skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific problem does the Quality Contract Harness solve compared to standard coding prompts?

This skill solves the "hallucination of success" problem where AI agents claim a task is finished without proof. It enforces a structured verification loop that requires real-world build evidence and local script validation before a task can be marked as complete.

### What are the technical requirements and supported agent environments?

The harness is designed for Node.js 18+ environments and works with any AI agent capable of executing local scripts and accessing project directories. It integrates via two specialized local scripts (`assist.cjs` and `engine.cjs`) to process data without needing external API calls.

### What is included in the purchase of this skill?

You receive the core quality logic, the specialized JavaScript execution engines (`assist.cjs` and `engine.cjs`), and the pre-configured workflow for risk assessment and evidence binding. It also includes documentation on how to authorize the necessary host tools for project observations.

### Does this skill require an external network connection or send my code to a third-party service?

No, all verification and evidence binding are performed locally using the provided scripts. This ensures your code and build outputs stay within your environment while still benefiting from structured quality audits.

### What happens if the skill cannot access my local build environment?

The harness requires 'authorized host tools' to observe your project files and build outputs. If these tools are missing or the agent lacks the necessary permissions to read the local environment, the skill will report an 'Unverified' status and block the quality gate.

### Can I customize the quality gates for different types of development tasks?

While the skill comes with a robust default logic for risk flags and quality gates, the contract planning phase allows for user approval. This ensures the verification plan is specifically tailored to the unique technical changes of your current project.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
