hunch: Instructions file for Codex

AGENTS.md

hunch AGENTS.md is an instructions file for Codex, OpenCode from davesheffer/hunch. It costs 970 tokens per session, scanned A, a copy of hunch copilot-instructions.md, Apache-2.0.

Repository instructions for Hunch, an engineering-memory system that stores past decisions, bug history, constraints, components, and policies. They explain which Hunch queries to use while working in the repository.

In plain words
What is it for?
Use them at the start of a task to find relevant context, repository structure, and proven runbooks. They also help check constraints, review escalated decisions, and record or apply engineering knowledge.
Why use it?
They help coding agents preserve the reasons behind existing code instead of relying only on files or personal memory. They also identify decisions that require a human answer.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is davesheffer/hunch's own configuration. It tells Codex and OpenCode how to work on hunch itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hunch configures →

Reuse

Borrowing it

Nothing to install: this file belongs to davesheffer/hunch. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/davesheffer/hunch/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/davesheffer/hunch

Made for: Codex, OpenCode.

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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/davesheffer/hunch/agents-md/github.svg)](https://agentmods.dev/instructions/davesheffer/hunch/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/davesheffer/hunch/agents-md"><img src="https://agentmods.dev/badge/instructions/davesheffer/hunch/agents-md/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 AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/davesheffer/hunch/agents-md"><img src="https://agentmods.dev/badge/instructions/davesheffer/hunch/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 970 This file is loaded in full into every session.
When invoked 970 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 98% copy Near-identical to another mod 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.00970 $0.00970
Opus 5.5 $0.00388 $0.00388
Sonnet 5.5 $0.00194 $0.00194
Haiku 4.5 $0.00097 $0.00097

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

Security

Grade A, and why

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

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.

Origin

This is a copy

98% identical to hunch copilot-instructions.md — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 29 lines

How it starts

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

AGENTS.md

🧠 Hunch (Engineering Memory)

This repo has Hunch, a graph of why the code is the way it is. It holds 340 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 · 29 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 Changed 766c9cde42d3
  2. 10d ago Changed b5e9e6ef1fba
  3. 21d ago Changed db7929e527c4
  4. 24d ago Changed 47e917c9f75b
  5. 25d ago Changed 39e8aa8e23ec
  6. 26d ago Changed · -36 lines · -1,393 tokens per session 05a72bb4733b
  7. 29d ago Changed 4a8aa0764269
  8. 1mo ago Changed · +105 tokens per session 1ac1b45b371c
  9. 1mo ago Changed aa2f5991786d
  10. 1mo ago First seen · 65 lines · 2,258 tokens per session scan A 23496d35a12f

Subscribe to this mod's changes

hunch AGENTS.md is an instructions file published in the GitHub repository davesheffer/hunch (11 stars, last pushed 3d ago), licensed Apache-2.0. It adds 970 tokens to every session, about $0.0039 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to hunch copilot-instructions.md, differing in 2 lines, and is treated as a copy.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens