Imported from lukemcqueen/hermes-cortex (
skills/software-development/agent-contract/SKILL.md). Install upstream withnpx skills add lukemcqueen/hermes-cortex --skill agent-contract. Copyright stays with the author.
Agent Contract
Rules (NON-NEGOTIABLE)
- Do real work — use tools, never simulate outputs/reads/tests/edits.
- Inspect before acting — read actual files, never guess.
- One change at a time — never batch unrelated edits.
- Verify with real commands — never claim success without evidence.
- Test FIRST (TDD Iron Law) — no production code without a failing test first. See
test-driven-development. A test written after the code passes immediately and proves nothing. - Never ask "do you want tests?" — testing is mandatory. Use the Test Decision Matrix in
change-test-loop; never punt to the user (ask about zero-infra projects once, not per-task). - Never push to main — branch per change; the review workflow merges it. Follow the repo's branch/PR convention.
- Follow repo conventions — over generic advice.
- Keep context lean — load only needed skills.
- Stop before destruction — get approval for data loss, security risk, privilege escalation.
- Protect secrets + auth — never expose, never weaken.
- Cross-repo handoff — for a fix in a repo you don't control, deliver a verification report + fix prompt to the maintainer; do not commit/PR there yourself.
- Proactively fix pre-existing issues — fix discovered bugs, failing tests, stale comments even if you didn't cause them. Skip only destructive fixes needing approval.
- Never ask permission for obvious fixes — fix first, report after. Stop only for destructive/security actions or genuine ambiguity.
- Cron fix verification — run through the scheduler —
python3 script.pydoes not update the cron scheduler'slast_status; runcronjob action='run' job_id=<id>after a cron fix and confirm the doctor clears. - No PII in the repo — public (MIT). Never commit real domains, home paths, emails, IPs, or hostnames; use placeholders. Enforcement:
secret-leak-detector.shblocks real emails in the public repo; the enforcer PII gate blocks real emails in skill/shared-surface writes. - Test end-to-end before declaring done — a fix never tested is indistinguishable from no fix. Watch RED → GREEN for every change.
- Extension points before core patches — core patch is last resort — prefer plugin, config, hook, external provider, wrapper, in that order, over a local core patch (lost on every update). Before a core patch, name the extension point checked and why it can't do the job. Never patch upstream; upstream fixes go as a PR, local workaround only as interim.
Flow
understand → inspect → plan → TEST (write failing test, WATCH IT FAIL — RED) → change (minimal code to pass — GREEN) → verify → report
Report Format (MANDATORY)
## Result
What changed
## Files changed
- path: purpose
## Verification
- command: result
## Unverified
Anything not tested
## Notes
Risks, follow-ups
Stop When
Requirements unclear | verification can't run | destructive action (needs approval) | dependency/tool missing | scope exceeds safe bounds
Anti-Patterns
Guessing | multi-change | skip verify | mask failures | "should work" | simulate outputs | code before understanding | test-after-code | commit-without-red-green | core-patch-first