hunch

hunch is a cursor rule for Cursor from davesheffer/hunch. It costs 989 tokens per session, scanned A, original, Apache-2.0.

A set of rules for consulting Hunch, an engineering-memory system containing decisions, bug history, constraints, components, and policies, before editing code.

In plain words
What is it for?
For orienting at the start of a task, finding relevant structure and runbooks, checking escalations, and viewing recent engineering decisions.
Why use it?
It gives the agent relevant project context and established procedures instead of relying on memory or repeated searches. It also surfaces decisions that require the human's answer.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit For orienting at the start of a task, finding relevant structure and runbooks, checking escalations, and viewing recent engineering decisions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/davesheffer/hunch/hunch
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.

Clone the repo
git clone --depth 1 https://github.com/davesheffer/hunch

Made for: Cursor.

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 hunch

README.md
[![agentmods](https://agentmods.dev/badge/rules/davesheffer/hunch/hunch/github.svg)](https://agentmods.dev/rules/davesheffer/hunch/hunch)
Your own site
<a href="https://agentmods.dev/rules/davesheffer/hunch/hunch"><img src="https://agentmods.dev/badge/rules/davesheffer/hunch/hunch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hunch

Your own site · 80×15
<a href="https://agentmods.dev/rules/davesheffer/hunch/hunch"><img src="https://agentmods.dev/badge/rules/davesheffer/hunch/hunch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 989 This file is loaded in full into every session.
When invoked 989 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00989 $0.00989
Opus 5.5 $0.00396 $0.00396
Sonnet 5.5 $0.00198 $0.00198
Haiku 4.5 $0.00099 $0.00099

Measured 5d ago against content hash 0f0ac249549e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hunch 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.

.cursor/rules/hunch.mdc · 32 lines

How it starts

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

🧠 Hunch (Engineering Memory)

This repo has Hunch, a graph of why the code is the way it is. It holds 339 decisions, 2 bugs, 31 constraints, 22 components, 3 policies, 26 open findings. Use the hunch_* MCP tools by moment:

  • Start: reuse the task ID and task verify command the prompt hook printed; with none, call hunch_task(action: "start", title) once. Then hunch_context(target, task_id) first. Orient with hunch_structure, hunch_workspaces, hunch_runbook(task). Ask the user about each hunch_escalations() entry; silence is never approval.
  • Design: hunch_why(target) (includes what was rejected), hunch_current_decision(topic), hunch_bug_lineage(symptom_or_symbol), hunch_compare(candidates), hunch_query(query).
  • Edit: hunch_check_constraints(scope), hunch_get_dependents(symbol) / hunch_blast_radius(target), hunch_findings(scope?).
  • Merge: hunch_conformance(), hunch_pr_impact(base?), hunch_merge_verdict. Policy review: hunch_policy_evaluate, hunch_policy_plan(policy_id), hunch_policy_card(policy_id), hunch_policy_proof; only a human activates a policy.
  • Record: hunch_capture_decision → hunch_record_decision; hunch_record_correction turns a human correction into an enforced rule; hunch_record_finding keeps an observation with evidence. Pass the task_id.
  • Finish: run checks through the task verify launcher. If the task used Hunch, you started it, or no host stop hook closes it, call hunch_task(action: "finish", task_id) and show its card verbatim. Its applications schema carries the claim rules.
  • To update Hunch, run hunch update from the repo root.

⛔ Top invariants (do not break)

  • [blocking] Synthesis must use an explicitly selected coding-assistant subscription CLI or the deterministic local fallback; never call a pay-per-token API (scope: src/synthesis/**; con_2ce3f2a547)
  • [blocking] This repo's generated wiki must never be committed to the public repo — private overlay wiki only (hunch wiki --private); wiki/ stays gitignored (scope: wiki/**; con_547fff76bd)
  • [blocking] Config/provider writers must merge idempotently into existing user files and refuse to clobber an unparseable file (scope: src/integrations/claudeConfig.ts, src/integrations/claudemd.ts, src/integrations/providers.ts, src/integrations/scaffold.ts; con_8460b6770f)
  • [blocking] All JSON writes to .hunch/ must be atomic (temp-file + rename) so an interrupted write can never truncate the index (scope: src/store/**, src/core/io.ts; con_902759b3dc)
  • [blocking] Forward-migrate raw JSON to the current schema BEFORE Zod validation; never silently drop unmigratable records (scope: src/core/migrate.ts, src/store/jsonStore.ts; con_947c578b2c)
  • [blocking] Semantic vectors are a derived layer in SQLite, never the source of truth; reconcile by content hash on reindex (scope: src/store/**; con_a87360128b)
  • [warning] Replace the blue-violet palette in the homepage particle helicoid with the prior green Hunch palette; convey gene mapping through structured loci, paired bands, quiet gaps, and moving mapped regions… (scope: site/dna-hero.js; con_009f720549)
  • [warning] Memory hygiene is the agent's job, done without waiting for the human: accept shipped roadmap proposals, settle provenance-repair escalations (apply the true commit or drop), re-anchor or stale… (scope: .hunch/**, ROADMAP.md, docs/autonomous-development.md; con_039cee7367)

Read the full file on GitHub · 32 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 Changed 0f0ac249549e
  2. 16d ago Changed bef87d549586
  3. 19d ago Changed f8a1ffc73ff6
  4. 20d ago Changed 54d4a8f8d48c
  5. 21d ago Changed · -36 lines · -1,393 tokens per session bfb82935ded8
  6. 24d ago Changed 14a8cd30560a
  7. 26d ago Changed · +105 tokens per session de79266acacb
  8. 27d ago Changed cb2fb7b24a59
  9. 29d ago Changed · +1 lines · +61 tokens per session f770f9d658ee
  10. 1mo ago First seen · 67 lines · 2,216 tokens per session scan A fb404f6954ba

Subscribe to this mod's changes

hunch is a cursor rule published in the GitHub repository davesheffer/hunch (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 989 tokens to every session, about $0.0040 per session on Opus 5.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.