contract

contract is a command for coding agents from studioKjm/ai-harness-template. It costs 26 tokens per session (777 once invoked), scanned A, original, MIT.

A command for the contract phase of a parallel change, a method for replacing an old interface while keeping the system working during the transition. It checks that no code still uses the old interface before removing it.

In plain words
What is it for?
Use it after migration is complete to verify zero old callers and advance a tracked change plan to its final removal phase.
Why use it?
It prevents the old code or data format from being deleted while callers still depend on it.

Command

Part of the harness plugin — 44 commands, 11 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/studiokjm/ai-harness-template/contract
Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contract

README.md
[![agentmods](https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/contract.svg)](https://agentmods.dev/commands/studiokjm/ai-harness-template/contract)
Your own site
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/contract"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/contract.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.00777
Opus 5 $0.00013 $0.00388
Sonnet 5 $0.00005 $0.00155
Haiku 4.5 $0.00003 $0.00078

Measured 5d ago against content hash 1f8461d6311c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

methodologies/parallel-change/commands/contract.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/contract — Advance to Contract Phase

Migrate → Contract 전환. 구버전 제거 직전 게이트.

When to use

  • All callers have been switched from old to new signature
  • Old code/schema is ready to be removed
  • Tests pass against new signature

Prerequisites

  • Plan in phase=migrate
  • pc.py callers <id> shows 0 callers of old
  • All migration commits merged

Usage

/contract <plan-id>

Instructions

This is the highest-stakes transition in the methodology — past contract phase, the old code/schema disappears. Two layers of verification:

Step 1 — Pre-flight check

Before advancing, run:

python3 .harness/methodologies/parallel-change/scripts/pc.py callers <plan-id>

If old callers > 0, do NOT proceed. Tell the user which files still need migration.

Step 2 — Advance

python3 .harness/methodologies/parallel-change/scripts/pc.py advance <plan-id> contract

The script verifies (one more time):

  • Plan in phase=migrate
  • Old callers count == 0
  • If either fails, refuses transition

Step 3 — Two gates now active for this plan

After contract phase:

Gate What it does
check-parallel-state.sh On every commit: verifies old still has 0 callers AND new still exists. Blocks regressions.
check-parallel-callers.sh On every commit: laser-focused — if old returns to >0 callers, BLOCK commit.

Both gates are blocking (severity: blocking). Even if a commit accidentally re-introduces a reference to the old signature, it cannot be committed while plan is in contract phase.

Step 4 — Removal of old code

After advancing to contract:

"Contract phase active. You may now safely remove old code/schema files. Each removal commit must keep the gate in PASS — no caller references must reappear. When old files are deleted from disk, run /parallel-change advance <id> done to mark plan complete."

Step 5 — Final transition: contract → done

When the user has actually removed old code/schema files:

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 90 lines · 26 tokens per session scan A 1f8461d6311c

Subscribe to this mod's changes

contract is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 777 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.