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.
npx agentmods add rules/david405/harness-kit/contract-before-changesgit clone --depth 1 https://github.com/David405/harness-kitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00349 | $0.00349 |
| Opus 5 | $0.00175 | $0.00175 |
| Sonnet 5 | $0.00070 | $0.00070 |
| Haiku 4.5 | $0.00035 | $0.00035 |
Grade A, and why
contract-before-changes 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 yesterday.
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.
What it actually says
Contract before any changes
No file is edited until a contract exists and the human has explicitly approved it in the current conversation.
Required order
- CONTRACT — write the contract at this repo's declared contracts path, with scope WILL / will NOT, a grounded file map, falsifiable success criteria, and verify commands.
- Present it and stop. Ask for approval.
- EXECUTE only after a clear yes.
Approval is an explicit statement. Urgency, a pasted requirement, a design doc, or "just update it" are not approval.
Applies to
Application source, tests, generated specs, product documentation, and any follow-up that feels small or obvious in the same conversation.
Allowed before approval
Reading files, inspecting history and pull requests, searching, and drafting the contract itself.
If execution started without approval
Revert the unapproved changes, write or amend the contract, then wait.
Review after execute
After VERIFY is green, run harness-review before staging or reporting done:
- Grade contract compliance (§0) against the actual diff
- Summarize findings and merge recommendation for the human in chat
- Then stage product files and set
FEATURES.jsontoPENDING_REVIEW
Do not skip review unless the human explicitly says so or AGENTS.md allows a trivial no-contract fix.
See harness-review skill and templates/REVIEW.md.
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.
- yesterday First seen · 45 lines · 349 tokens per session scan A 021cc9830e24
contract-before-changes is a cursor rule published in the GitHub repository David405/harness-kit (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 349 tokens to every session, about $0.0017 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-31.
Other cursor rules, from other repositories
test-plan
Plan Katalon True Platform/TestOps testing for a release, sprint, or feature. Use when you need to translate quality goals into scope, prioritize testing by requirement coverage and risk, decide what to test first, or build the executable plan structure (folders, suites, and sprint/release association) that stands in…
cli-forge-schema
Generate GitHub-compatible Mermaid diagrams — auto-picks diagram type, splits complex ones, converts tables/kanban/PERT.
STAGE_S5_TEST_POINTS
AIDocxWorkFlow Stage 5 — 测试点生成(独立阶段).
sprint-planning
BMAD BMM Agent: sprint-planning.
head-of-product
Head of Product persona — planning, user stories, UX decisions, scope guardian. Use when discussing product strategy, PRDs, user research, feature proposals, or backlog prioritization.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.