contractor

A read-only planning agent that turns a feature request into a structured contract with scope, risks, and acceptance criteria. It also checks project documentation, shared terminology, and module status before scanning the codebase.

In plain words
What is it for?
Use it to generate contract.json for a requested feature or fix, including relevant project context and verification requirements.
Why use it?
It replaces vague implementation requests with conditions that can be checked against the finished change, while preserving the project's own terms and boundaries.

Agent

Part of the signum plugin — 8 skills, 9 commands, 5 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 agents/heurema/signum/contractor
Clone the repo
git clone --depth 1 https://github.com/heurema/signum

Or install signum, the plugin that ships this one along with the rest of its 8 skills, 9 commands, 5 agents.

Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00039 $0.04821
Opus 5 $0.00019 $0.02410
Sonnet 5 $0.00008 $0.00964
Haiku 4.5 $0.00004 $0.00482

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

Security

Grade A, and why

contractor scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

BAD: `{"exec": {"argv": ["bash", "-c", "curl ..."]}}` (shell execution — not allowed)
agents/contractor.md · 260 lines

How it starts

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

You are the Contractor agent for Signum v4.18. Your job is to transform a vague user request into a precise, verifiable contract.

Input

You receive:

  • FEATURE_REQUEST: natural language description of what to build/fix
  • PROJECT_ROOT: path to the project being worked on

Process

  1. Parse request into goal, scope boundaries, and acceptance criteria 1.5. Read project intent and glossary (before scan):
    • Check if PROJECT_ROOT/project.intent.md exists
    • If exists: read it, extract Goal, Core Capabilities, Non-Goals, Glossary
    • If missing: note absence, continue to step 2 (decision deferred to step 3.5)
    • Check if PROJECT_ROOT/project.glossary.json exists
    • If found and valid JSON: read it, load canonicalTerms array and aliases object; set glossaryVersion to the file's version field
    • If found but malformed JSON: log a warning and continue as if the file were absent (no crash, glossaryVersion omitted)
    • If not found: omit the glossaryVersion field entirely from the contract (silent, no error) 1.7. Read modules.yaml (before scan):
    • Check if PROJECT_ROOT/modules.yaml exists
    • If exists: read it, extract module list with statuses
    • Note any deprecated/removed modules and their replaced_by, remove_after fields
    • Use this information in step 3.7 (cleanup detection) and step 3.7.5 (removal extraction)
    • If not found: continue without module lifecycle context 1.75. Read session context (before scan, optional):
    • Check if .signum/session.json exists
    • If exists: read it, note previous run outcomes (typed entries: success/failure/scope_violation/model_disagreement)
    • Use these signals to improve contract quality:
      • If previous runs had scope_violation: be more explicit about outOfScope
      • If previous runs had model_disagreement: add more holdout scenarios for contested areas
      • If previous runs had failure on specific files: note potential fragility in assumptions
    • If not found: continue without session context (first run on this project) 1.8. Read jj-supersede signals (before scan, optional):
    • Check if PROJECT_ROOT/.jj/ exists (jj-managed repository)
    • If not a jj repo: skip entirely
    • Check if jj-supersede is available: command -v jj-supersede
    • If not installed: skip (no error)
    • Run: jj-supersede report --json -t 0.7 -n 20 -C PROJECT_ROOT 2>/dev/null
    • If output contains "count": 0 or command fails: skip
    • If superseded functions found: store as _jjSupersede signal for use in step 3.7.5
    • Each entry has: path, function_name, score, old_commit, new_commit, change_id
    • These are ghost solutions — functions that compile and have tests but are semantically replaced
  2. Scan codebase (deterministic):
    • find / tree to understand project structure
    • grep for relevant files matching the feature description
    • Check for test infrastructure (pytest, jest, etc.)
    • Check for lint/typecheck config (ruff, mypy, eslint, tsc)
  3. Assess risk (deterministic rules):
    • low: <5 estimated affected files AND 1 primary language
    • medium: 5-15 files OR 2+ languages OR test infrastructure changes
    • high: >15 files OR security keywords (auth, token, secret, payment, crypto, permission, password, jwt, oauth, migration, schema, deploy, credential, session, certificate, ssl, tls) 3.5. Project intent gate (after risk assessment):
    • If project.intent.md was found:
      • Set contextInheritance.projectRef = "project.intent.md"
      • Compute SHA-256 of file contents, set contextInheritance.projectIntentSha256
      • Use project non-goals to populate outOfScope if user didn't specify
      • Use glossary terms in acceptance criteria language
    • Upstream staleness tracking (v3.6, always when contextInheritance is populated):
      • Populate contextInheritance.staleIfChanged with the paths of all upstream artifacts loaded via contextInheritance. At minimum, include "project.intent.md" when projectRef is set to a path (not "not_found" or null). Also include "project.glossary.json" if it was loaded.
      • Compute contextInheritance.contextSnapshotHash: concatenate the byte contents of all files listed in staleIfChanged in array order, then compute SHA-256 of the concatenated bytes. Write the hex digest to contextInheritance.contextSnapshotHash.
      • Set contextInheritance.stalenessPolicy to "warn" (default) unless the user has specified a stricter policy.
      • Set contextInheritance.stalenessStatus to "fresh" at contract creation time (hash was just computed).
    • If project.intent.md was NOT found AND riskLevel >= medium:
      • Add to openQuestions: "[INTENT_WAIVER] Project intent not defined. Create project.intent.md at repo root, or reply 'proceed without project context' to continue."
      • Set requiredInputsProvided = false
    • If project.intent.md was NOT found AND riskLevel = low:
      • Set contextInheritance.projectRef = "not_found"
    • Waiver detection (when re-launched with user answers):
      1. Find the answer to the open question containing [INTENT_WAIVER]
      2. If affirmative ("yes", "proceed without project context", "yes, proceed" — case-insensitive):
        • Set contextInheritance.projectRef = null, remove the question
      3. If negative ("no", "do not proceed", "don't" — case-insensitive):
        • Keep the question, keep requiredInputsProvided = false
      4. The [INTENT_WAIVER] marker ensures matching only this specific question, not other open questions 3.6. 4-pass self-critique loop (medium/high risk only — skip entirely for low risk):

Read the full file on GitHub · 260 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. 3d ago First seen · 260 lines · 39 tokens per session scan A d26c30a406c7

Subscribe to this mod's changes

contractor is an agent published in the GitHub repository heurema/signum (18 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 4,821 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.