@davesheffer/hunch 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -336
- package/dist/cli/index.js +54 -37
- package/dist/cli/invocation.js +55 -2
- package/dist/constitution/experiment.js +90 -0
- package/dist/constitution/service.js +21 -4
- package/dist/store/embedder.js +1 -1
- package/dist/synthesis/provider.js +271 -51
- package/dist/synthesis/synthesize.js +4 -3
- package/dist/wiki/wiki.js +2 -2
- package/package.json +9 -2
- package/tooling/competitive-watch.mjs +108 -0
package/README.md
CHANGED
|
@@ -1,388 +1,112 @@
|
|
|
1
1
|
# Hunch
|
|
2
2
|
|
|
3
|
-
## Your
|
|
3
|
+
## Your repo remembers why.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@davesheffer/hunch)
|
|
6
6
|
[](https://github.com/davesheffer/hunch)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Hunch is engineering memory for AI-assisted codebases. It records the decisions, constraints,
|
|
10
|
+
rejected approaches, and bug history behind your code, then gives every connected assistant the
|
|
11
|
+
relevant context before it makes a change.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Memory starts **advisory**. Nothing blocks until you explicitly trust a precise rule and choose
|
|
14
|
+
strict enforcement.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
cd your-repo
|
|
19
|
-
hunch init
|
|
20
|
-
```
|
|
16
|
+
**Memory is the input. The product boundary is the receipt:** relevant evidence before an edit,
|
|
17
|
+
then a deterministic check of the change against the rules your team has explicitly trusted.
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## The problem Hunch solves
|
|
25
|
-
|
|
26
|
-
AI can read your current code. It does not know the decision you made six months ago, the incident
|
|
27
|
-
that made it necessary, or the approach you deliberately rejected yesterday.
|
|
28
|
-
|
|
29
|
-
That gap is where architectural drift starts:
|
|
30
|
-
|
|
31
|
-
| Without Hunch | With Hunch |
|
|
32
|
-
| --- | --- |
|
|
33
|
-
| A refactor passes tests but bypasses a hard-won service boundary. | The change is checked against the decision, its constraint, and the incident behind it. |
|
|
34
|
-
| A new coding session starts from scratch. | Claude Code, Cursor, Copilot, Windsurf, Antigravity, and Codex retrieve the same project memory over MCP. |
|
|
35
|
-
| A correction disappears into a chat transcript. | “Never do that again” becomes a scoped, auditable guard. |
|
|
36
|
-
| Code review sees a diff, not the reason behind it. | Change Gate produces a PASS / WARN / BLOCK receipt with causal evidence. |
|
|
19
|
+
## Start in five minutes
|
|
37
20
|
|
|
38
|
-
|
|
21
|
+
Requires Node 22.13+ and a git repository.
|
|
39
22
|
|
|
40
23
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
hunch
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Hunch creates a local graph of:
|
|
47
|
-
|
|
48
|
-
- **Decisions** — what was chosen, why, and what alternatives were rejected.
|
|
49
|
-
- **Constraints** — the invariants a change must not violate.
|
|
50
|
-
- **Bug lineage** — the root cause behind fixes, recurrences, and regression guards.
|
|
51
|
-
- **Architecture** — symbols, components, dependencies, blast radius, and fragility.
|
|
52
|
-
Deep code-structure parsing covers **TypeScript, JavaScript, and Python** (via a language
|
|
53
|
-
registry — each new language is one entry); the "why" layer works for any language.
|
|
54
|
-
|
|
55
|
-
It then puts that context where work happens: MCP tools, the CLI, a VS Code Change Gate, git hooks,
|
|
56
|
-
and an optional pull-request guard.
|
|
57
|
-
|
|
58
|
-
## Memory that runs itself (v1.8)
|
|
59
|
-
|
|
60
|
-
There is no review queue to manage. Hunch's memory loop is fully automated, and the rare decision
|
|
61
|
-
that genuinely needs a human is asked **inline, at the moment** — never parked in a backlog:
|
|
62
|
-
|
|
63
|
-
- **Auto-trust** — every captured decision enters the graph as live advisory memory the moment it
|
|
64
|
-
lands. It grounds and ranks immediately; it can never hard-block anything until a human
|
|
65
|
-
explicitly vouches for it. Migrate an old draft backlog once with `hunch adopt-drafts`.
|
|
66
|
-
- **A source-control panel for memory** — the VS Code **Hunch Memory** view shows every move
|
|
67
|
-
Hunch makes (capture / adopt / supersede / prune / repair) as a timeline: click for the diff,
|
|
68
|
-
right-click to revert locally. `hunch log` is the same spine in the terminal.
|
|
69
|
-
- **Inline escalations** — `hunch escalations` (and the `hunch_escalations` MCP tool) lists only
|
|
70
|
-
what the graph cannot resolve itself: a topic conflict, a candidate rule awaiting review, a
|
|
71
|
-
proposed rule ready to activate. Each entry is a question with its resolution verb. Normally
|
|
72
|
-
empty.
|
|
73
|
-
- **Self-repair** — rename a file and the next sync automatically heals every decision binding,
|
|
74
|
-
tripwire scope, constraint scope, and policy selector that matched it exactly (git's own rename
|
|
75
|
-
detection, zero guessing). Repairs land as revertable timeline moves; a repaired *policy* asks
|
|
76
|
-
once, inline, for a fresh proof.
|
|
77
|
-
- **Local-first by design** — memory auto-commits locally and rides your next push;
|
|
78
|
-
`hunch push` (or the panel's Approve-to-push) is the one deliberate outward step.
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
hunch log # the memory timeline (what Hunch did, when, revertable)
|
|
82
|
-
hunch escalations # the decisions only you can make — normally empty
|
|
83
|
-
hunch repair --apply # heal bindings after a rename (sync does this automatically)
|
|
24
|
+
npm i -g @davesheffer/hunch
|
|
25
|
+
cd your-repo
|
|
26
|
+
hunch init
|
|
27
|
+
hunch backfill --since 90d # optional: seed memory from recent history
|
|
84
28
|
```
|
|
85
29
|
|
|
86
|
-
|
|
30
|
+
Reload your coding assistant, then ask:
|
|
87
31
|
|
|
88
|
-
|
|
89
|
-
Windsurf, Google Antigravity, Codex, and any agent that can read `AGENTS.md`; where a client exposes hooks,
|
|
90
|
-
it adds a native lifecycle adapter too.
|
|
32
|
+
> Why is this built this way?
|
|
91
33
|
|
|
92
|
-
|
|
93
|
-
|
|
34
|
+
`hunch init` indexes the repo, installs the local memory hooks, and connects supported assistants
|
|
35
|
+
to the same graph. It merges into existing configuration instead of replacing it.
|
|
94
36
|
|
|
95
|
-
|
|
96
|
-
CLI you choose. It never guesses which of several installed subscriptions to bill—set your local,
|
|
97
|
-
gitignored preference with `hunch provider codex-cli` (or `claude-cli` / `cursor-agent`); otherwise
|
|
98
|
-
Hunch uses a subscription only when exactly one is available, and falls back to deterministic local
|
|
99
|
-
drafting when the choice is ambiguous.
|
|
37
|
+
## What Hunch gives you
|
|
100
38
|
|
|
101
|
-
|
|
102
|
-
Claude Code
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
39
|
+
- **Durable context** — decisions and corrections survive the chat session that produced them.
|
|
40
|
+
- **One memory for every assistant** — Claude Code, Cursor, Copilot, Windsurf, Antigravity, Codex,
|
|
41
|
+
and any MCP client see the same evidence.
|
|
42
|
+
- **Change receipts** — review a working tree, commit, or branch against recorded intent and get a
|
|
43
|
+
cited PASS / WARN / BLOCK result.
|
|
44
|
+
- **Bug lineage** — understand which old incident a line fixed before accidentally undoing it.
|
|
45
|
+
- **Code awareness** — TypeScript, JavaScript, and Python structure feed dependency, blast-radius,
|
|
46
|
+
and redundancy checks. The reasoning layer works with any language.
|
|
109
47
|
|
|
110
|
-
|
|
48
|
+
The source of truth is readable JSON in `.hunch/`. A local SQLite index makes retrieval fast but
|
|
49
|
+
is always rebuildable.
|
|
111
50
|
|
|
112
|
-
|
|
113
|
-
base. It returns a receipt your human reviewer or any coding agent can understand:
|
|
51
|
+
## Day-to-day
|
|
114
52
|
|
|
115
|
-
|
|
116
|
-
BLOCK src/payments/charge.ts
|
|
53
|
+
Most memory work happens automatically after commits. These commands cover the common manual paths:
|
|
117
54
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
55
|
+
| Command | Use it for |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `hunch why <file>` | Decisions, bugs, constraints, and blast radius behind a file |
|
|
58
|
+
| `hunch query "<question>"` | Search project memory |
|
|
59
|
+
| `hunch check --working` | Review all current changes against recorded intent |
|
|
60
|
+
| `hunch log` | See the memory timeline and its reversible moves |
|
|
61
|
+
| `hunch escalations` | See the rare decisions only a human can make |
|
|
62
|
+
| `hunch doctor` | Diagnose setup, provider, index, or private-overlay problems |
|
|
122
63
|
|
|
123
|
-
|
|
124
|
-
|
|
64
|
+
Corrections can become scoped rules, but captured memory cannot hard-block on its own. Enforcement is
|
|
65
|
+
deterministic and opt-in:
|
|
125
66
|
|
|
126
67
|
```bash
|
|
127
68
|
hunch firmness strict
|
|
128
69
|
hunch check --staged --strict
|
|
129
|
-
hunch conform --strict
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Hunch Constitution — experimental Gate G1 + evidence bootstrap
|
|
133
|
-
|
|
134
|
-
Hunch can now lift one structured architectural decision into versioned Policy IR, prove its
|
|
135
|
-
deterministic behavior with a clean baseline plus a mutation, and require an explicit human event
|
|
136
|
-
before it becomes enforceable:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
hunch constitution bootstrap --public-only --since 90d --max-candidates 3
|
|
140
|
-
hunch constitution ingest --public-only --since 90d
|
|
141
|
-
hunch constitution ingest --public-only --instructions --from pr-export.json
|
|
142
|
-
hunch constitution delta dec_fix_or_revert --public-only
|
|
143
|
-
hunch constitution bootstrap --history --public-only --since 90d --max-candidates 3
|
|
144
|
-
hunch policy compile dec_service_boundary --through OrderService
|
|
145
|
-
hunch policy corpus pol_… --import corpus.json
|
|
146
|
-
hunch policy plan pol_… --history 20 --mutations 3
|
|
147
|
-
hunch policy prove pol_…
|
|
148
|
-
hunch policy history pol_…
|
|
149
|
-
hunch policy history pol_… --commit <full-sha> --classify true_positive_actionable --actor github:your-name --reason "Confirmed historical violation"
|
|
150
|
-
hunch policy shadow pol_… --record
|
|
151
|
-
hunch policy shadow pol_…
|
|
152
|
-
hunch policy card pol_…
|
|
153
|
-
hunch policy relations pol_…
|
|
154
|
-
hunch policy accept pol_… --blocking --actor github:your-name
|
|
155
|
-
hunch policy evaluate pol_… --json
|
|
156
|
-
hunch policy evaluate pol_… --working --json
|
|
157
|
-
hunch policy evaluate pol_… --staged --json
|
|
158
70
|
```
|
|
159
71
|
|
|
160
|
-
|
|
161
|
-
at least ten P3+ policies and seven category-specific runbooks; drills write no evidence by
|
|
162
|
-
themselves, rehearsals bind the resulting hashes, and historical shadow backfill commits only after
|
|
163
|
-
the complete policy/commit matrix has produced no unknown or error result:
|
|
72
|
+
## Synthesis without surprise billing
|
|
164
73
|
|
|
165
|
-
|
|
166
|
-
hunch constitution g2 --plan private-g2-plan.json
|
|
167
|
-
hunch constitution g2 --drill all
|
|
168
|
-
hunch constitution g2 --rehearse rb_g2_evaluator_error_01 --result passed \
|
|
169
|
-
--actor human:owner --evidence sha1:… --notes "Exact recovery drill passed."
|
|
170
|
-
hunch constitution g2 --backfill 20
|
|
171
|
-
hunch constitution g2 --queue 20
|
|
172
|
-
hunch constitution g2 --strict
|
|
173
|
-
```
|
|
74
|
+
Hunch can draft structured memory through:
|
|
174
75
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
the strongest machine result is `eligible_for_human_g2_signoff`.
|
|
179
|
-
|
|
180
|
-
The model-free bootstrap considers only current, accepted, human-confirmed decisions carrying
|
|
181
|
-
exactly one structured `conformance` predicate. It normalizes auditable evidence and keeps a bounded
|
|
182
|
-
queue of at most three unreviewed candidates. Re-running is idempotent, private evidence inherits
|
|
183
|
-
private storage, and every candidate starts with `authority: null`—bootstrap can never activate or
|
|
184
|
-
block on its own.
|
|
185
|
-
|
|
186
|
-
The opt-in history path reads the exact blobs for a human-confirmed fix/revert commit and its first
|
|
187
|
-
parent—without checking out code or running hooks. It also admits an architectural replacement
|
|
188
|
-
when a human-confirmed decision carries an explicit `retired.deps` entry that exactly matches a
|
|
189
|
-
removed external package. It enumerates only assertions the current graph can bind exactly and
|
|
190
|
-
whose symbol/call/package identifiers the human judgment explicitly names. One
|
|
191
|
-
supported meaning may become a compiled candidate; zero, multiple, missing,
|
|
192
|
-
or ambiguous meanings are stored as `uncompilable`, never silently approximated. `constitution
|
|
193
|
-
delta` previews that evidence and candidate set without writing policy state.
|
|
194
|
-
|
|
195
|
-
The external-import slice is deliberately narrow: removing a human-named static ESM package
|
|
196
|
-
specifier can compile into a file-scoped `not-reaches(..., external:<package>)` boundary. Package
|
|
197
|
-
subpaths canonicalize to their package root, the anchor must exist before and after the change, and
|
|
198
|
-
an explicitly retired dependency filters unrelated call/symbol facts from the same replacement
|
|
199
|
-
commit. Exact relative JS/TS imports across two derived components can also compile to direct
|
|
200
|
-
`reaches`/`not-reaches` policies over `depends_on` edges when both component meanings are explicitly
|
|
201
|
-
human-grounded. Same-component imports, ambiguous/missing targets, import-map aliases, `require()`,
|
|
202
|
-
dynamic `import()`, runtime loading, and positive external-package requirements remain visibly
|
|
203
|
-
unsupported.
|
|
204
|
-
|
|
205
|
-
Local correction, incident, and test-failure records can be normalized with `constitution ingest`.
|
|
206
|
-
The adapter stores references and hashes, inherits private storage, and creates no policy authority.
|
|
207
|
-
Add `--instructions` to hash committed AGENTS/CLAUDE/Copilot/Cursor/Windsurf instructions and ADRs
|
|
208
|
-
from immutable Git blobs. Add `--from` for one or more strict local review, conversation, or PR
|
|
209
|
-
export JSON files. Raw prose is never copied into EvidenceEvents; only bounded metadata, references,
|
|
210
|
-
and content hashes persist. Mixed batches validate before the first write, public-only mode refuses
|
|
211
|
-
private/secret items, and unsupported meaning stays explicitly `uncompilable` instead of being
|
|
212
|
-
approximated into a policy.
|
|
213
|
-
|
|
214
|
-
```json
|
|
215
|
-
{
|
|
216
|
-
"version": 1,
|
|
217
|
-
"source": "pr_export",
|
|
218
|
-
"items": [{
|
|
219
|
-
"id": "pr-431-review-7",
|
|
220
|
-
"kind": "review",
|
|
221
|
-
"occurred_at": "2026-07-10T10:10:00Z",
|
|
222
|
-
"actor": "maintainer:alice",
|
|
223
|
-
"commit": "abc1234",
|
|
224
|
-
"files": ["src/orders.ts"],
|
|
225
|
-
"text": "Use OrderService; do not call persistence here.",
|
|
226
|
-
"data_class": "private",
|
|
227
|
-
"maintainer_confirmed": true
|
|
228
|
-
}]
|
|
229
|
-
}
|
|
230
|
-
```
|
|
76
|
+
- a selected Claude Code, Codex, or Cursor subscription CLI;
|
|
77
|
+
- an opt-in OpenAI-compatible local endpoint such as Ollama, vLLM, LM Studio, or llama.cpp; or
|
|
78
|
+
- the built-in deterministic fallback when no model is available.
|
|
231
79
|
|
|
232
|
-
|
|
233
|
-
known-good/known-bad corpus, deterministic mutation operators, expectations, and resource budgets.
|
|
234
|
-
`policy corpus --import` accepts bounded labeled `known_bad`/`known_good` Git refs, resolves them
|
|
235
|
-
once to full immutable commit SHAs, stores the manifest in the policy's public/private home, and
|
|
236
|
-
hash-binds it into every resulting plan. A commit cannot be labeled both good and bad, and stale
|
|
237
|
-
policy-bound corpora must be re-imported after semantic policy changes. A `known_good` fixture may
|
|
238
|
-
also carry an explicit human attestation—`{ "actor": "github:your-name", "reason": "…" }`—to
|
|
239
|
-
document why that accepted variant belongs in the corpus. Attested fixtures are replayed once as
|
|
240
|
-
named corpus evidence and excluded from accepted-history sampling; the attestation cannot waive a
|
|
241
|
-
policy result or create authority.
|
|
242
|
-
`policy relations` is a read-only view of those explicit exception-parent links. It shows the
|
|
243
|
-
selected policy, its parent if any, linked narrower exceptions, and a visible missing-parent marker
|
|
244
|
-
for a manually damaged record. When the broad parent is planned, proved, or evaluated, every linked
|
|
245
|
-
exception descendant is instead hash-bound into one canonical composition. The deepest applicable
|
|
246
|
-
explicit scope selects the result; equal-scope ambiguity, missing bindings, or unsupported component
|
|
247
|
-
path precision stays unknown/error rather than falling through to the broad rule.
|
|
248
|
-
`policy consolidation` is also read-only. When a compiler-produced advisory scope suggestion exists,
|
|
249
|
-
it groups only matching narrow policies with the same assertion/data class and syntactically contained
|
|
250
|
-
scopes, then requires three independent decision references with no exception, active-policy,
|
|
251
|
-
conflict, or counterexample signal before marking the packet reviewable. It never merges or widens a
|
|
252
|
-
policy.
|
|
253
|
-
`policy history` inspects every violated accepted-history receipt and its current human disposition.
|
|
254
|
-
Disposition records are strict, content-addressed, stored in the policy's public/private home, and
|
|
255
|
-
bound to the exact policy hash, proof, plan, commit, and replay receipt. Corrections append a new
|
|
256
|
-
record with `--supersedes`; prior judgments remain auditable. Only `true_positive_actionable` clears
|
|
257
|
-
the history-evidence gate. False positives, insufficient-parser unknowns, and accepted exceptions
|
|
258
|
-
remain blockers until the policy/evaluator or combined exception semantics are repaired and
|
|
259
|
-
re-proved. A disposition never activates policy: blocking still requires a separate explicit human
|
|
260
|
-
`policy accept`, and a later corrected disposition is rechecked on every gate evaluation.
|
|
261
|
-
`policy shadow --record` appends one content-addressed evaluation for the exact current graph and
|
|
262
|
-
deduplicates retries of the same receipt. Violations use a separate append-only human disposition
|
|
263
|
-
chain, while `policy shadow` reports raw recent-window counts, confirmed and lower-bound precision,
|
|
264
|
-
unknown/error rate, mutation sensitivity, thresholds, and P4-review eligibility. Shadow records
|
|
265
|
-
never warn, block, change proof class, or activate policy; the MCP shadow tool is read-only.
|
|
266
|
-
Planning runs no replay, test, model, or activation; `policy prove` binds its receipt to that plan.
|
|
267
|
-
Proof execution checks out each unique immutable commit into a disposable worktree with hooks,
|
|
268
|
-
user-global Git configuration, private-overlay discovery, and provider selection disabled. It
|
|
269
|
-
indexes cold snapshots through a bounded four-worker pool (hard maximum eight), reuses
|
|
270
|
-
content-validated data-class-separated graph caches, records canonical current/known-good/
|
|
271
|
-
known-bad/accepted-history receipts, then removes every checkout and transient graph. Scheduling
|
|
272
|
-
and cache statistics never enter proof hashes. Project code, builds, and tests are never executed.
|
|
273
|
-
Timeouts, worker failures, unresolved refs, unknowns, and errors remain explicit.
|
|
274
|
-
|
|
275
|
-
Level-1 evaluators include `must-pass-through` (every statically discovered path from A to C must
|
|
276
|
-
contain B), exact external-package boundaries, and component/component-id selectors over static
|
|
277
|
-
`depends_on` edges. CLI, MCP (`hunch_policy_evaluate`), and strict CI share the exact canonical
|
|
278
|
-
receipt. Direct `reaches`/`not-reaches` contradictions are stored as conflict evidence without
|
|
279
|
-
minting a second policy or changing authority. Candidate records retain the exact alternatives,
|
|
280
|
-
unsupported facts, incumbent, and conflict IDs for proof-card review. Equivalent evidence enriches
|
|
281
|
-
the incumbent idempotently without changing its assertion, scope, proof, lifecycle, or authority.
|
|
282
|
-
Three independently grounded component-policy sources may add an advisory common-path scope
|
|
283
|
-
suggestion, while same-named behavior outside a narrow symbol scope is surfaced as a counterexample.
|
|
284
|
-
Suggestions and counterexamples are review evidence only: the compiled scope is never widened
|
|
285
|
-
automatically.
|
|
286
|
-
|
|
287
|
-
Executable-behavior policies keep their proof and history replay bound to immutable commits and
|
|
288
|
-
exact dependency snapshots. For advisory delivery, `policy evaluate --staged`, `--working`, the MCP
|
|
289
|
-
workspace option, and the pre-commit `check` path materialize the selected pending snapshot in a
|
|
290
|
-
disposable checkout before running the same hash-pinned test. The receipt binds the base commit,
|
|
291
|
-
snapshot hash, and changed paths; untracked regular files are included, repository hooks and global
|
|
292
|
-
Git configuration remain disabled, and dependency-manifest changes return an explicit error rather
|
|
293
|
-
than using stale dependencies. Advisory violations warn but never block, and `--public-only` never
|
|
294
|
-
loads private policies.
|
|
295
|
-
An intentional narrow opposite can be linked explicitly with `hunch policy exception <child>
|
|
296
|
-
--parent <parent> --actor human:<identity> --reason "…"`. The relationship requires identical
|
|
297
|
-
bindings/relation, opposite `reaches` semantics, matching data class/home, and a strictly contained
|
|
298
|
-
scope. Linking invalidates the child's prior proof and authority and returns it to non-blocking
|
|
299
|
-
`compiled` state. The broad parent remains the enforcement unit: its plan, proof, replay and mutation
|
|
300
|
-
receipts bind the full exception tree, and any later exception change retracts blocking eligibility
|
|
301
|
-
until a fresh composite proof is generated. Proof never activates the parent; a separate human
|
|
302
|
-
`policy accept` remains mandatory.
|
|
303
|
-
Models do not participate in evaluation or activation. Plan-bound proofs cover the committed current
|
|
304
|
-
baseline, known-good/known-bad fixtures, bounded accepted history, and a canonical mutation
|
|
305
|
-
manifest. The primary mutation is applied to an immutable disposable source checkout, must remain
|
|
306
|
-
parseable, and persists its exact Git diff plus resulting graph diff. Comment/string parser and
|
|
307
|
-
same-name ambiguity controls remain separate; any failed required receipt prevents blocking review.
|
|
308
|
-
Optional project build/test status is reported separately and is never required for evaluator
|
|
309
|
-
sensitivity. Historical hits are
|
|
310
|
-
not called false positives until classified, and unclassified hits or replay errors prevent
|
|
311
|
-
blocking approval. Shadow evidence and broader compiler inference remain follow-on work and are
|
|
312
|
-
reported as limitations in the proof artifact.
|
|
313
|
-
|
|
314
|
-
`policy card` (also `hunch_policy_card` over MCP) renders the same deterministic review surface for
|
|
315
|
-
every client: exact assertion and scope, raw evidence vector, unclassified hits, unknown/errors,
|
|
316
|
-
blocking readiness, current authority, limitations, and next actions. It never averages evidence
|
|
317
|
-
into a confidence score and never grants authority.
|
|
318
|
-
|
|
319
|
-
The versioned 20-case EXP-03 compiler bank is recomputed with:
|
|
80
|
+
When several subscription CLIs are installed, Hunch does not guess which plan to use:
|
|
320
81
|
|
|
321
82
|
```bash
|
|
322
|
-
hunch
|
|
83
|
+
hunch provider codex-cli
|
|
323
84
|
```
|
|
324
85
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
threshold. This curated scorecard measures deterministic compiler classification, not real-user
|
|
329
|
-
authoring speed or acceptance; those human-review arms remain a separate EXP-03 study.
|
|
330
|
-
|
|
331
|
-
## Private when the reasoning is sensitive
|
|
332
|
-
|
|
333
|
-
Open-source the code without open-sourcing the reasoning.
|
|
334
|
-
|
|
335
|
-
```bash
|
|
336
|
-
hunch private ~/work/hunch-private/.hunch
|
|
337
|
-
hunch record-bug --private --test "billing regression" --message "…"
|
|
338
|
-
hunch review --private
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
Private decisions, bugs, constraints, and wiki pages live in a separate overlay you control.
|
|
342
|
-
Local checks enforce them; public CI reports use `--public-only`, so private memory never appears in
|
|
343
|
-
a pull-request comment or committed grounding file. Private captures default to deterministic local
|
|
344
|
-
synthesis, keeping sensitive diffs and failure messages out of subscription-model drafting.
|
|
345
|
-
|
|
346
|
-
## A workflow your team can trust
|
|
347
|
-
|
|
348
|
-
Hunch is deliberately conservative:
|
|
349
|
-
|
|
350
|
-
- **Human-confirmed rules get the teeth.** Drafted memory advises; confirmed, precise invariants can block.
|
|
351
|
-
- **Every result carries receipts.** Decisions, constraints, bugs, confidence, and evidence are connected.
|
|
352
|
-
- **Drift is visible.** `hunch doctor` catches stale references, stale generated docs, and broken overlay pointers.
|
|
353
|
-
- **Public surfaces are public-only.** Private overlay data stays local unless you explicitly choose to share it.
|
|
354
|
-
- **No magic rewrite bot.** Hunch proposes and checks; you decide what becomes truth.
|
|
355
|
-
|
|
356
|
-
## Try the moment it earns its keep
|
|
86
|
+
Local and private-network endpoints work without a billing flag. Every public remote requires the
|
|
87
|
+
explicit `HUNCH_SYNTH_ALLOW_METERED=1` opt-in, because Hunch cannot infer cost from a hostname.
|
|
88
|
+
See [Synthesis & billing](https://hunch-pi.vercel.app/docs#synthesis) for setup details.
|
|
357
89
|
|
|
358
|
-
|
|
359
|
-
Unit tests pass. The architecture is still wrong.
|
|
90
|
+
## Local-first and portable
|
|
360
91
|
|
|
361
|
-
Hunch
|
|
362
|
-
|
|
363
|
-
the missing layer between fast code generation and durable engineering judgment.
|
|
92
|
+
Hunch has no hosted memory service or telemetry. Your graph travels with git and speaks MCP, so it
|
|
93
|
+
is not tied to one editor or model provider.
|
|
364
94
|
|
|
365
|
-
|
|
95
|
+
Sensitive reasoning can live in a separate private overlay:
|
|
366
96
|
|
|
367
97
|
```bash
|
|
368
|
-
|
|
98
|
+
hunch private --repo git@github.com:you/project-memory.git
|
|
369
99
|
```
|
|
370
100
|
|
|
371
|
-
|
|
372
|
-
version and optional release tag to HEAD; runs typecheck, the full suite, core and VS Code builds,
|
|
373
|
-
a fresh public repository index plus strict architectural conformance, a clean-installed tarball replay/privacy rehearsal, and the
|
|
374
|
-
production dependency audit; then writes a content-addressed receipt under
|
|
375
|
-
`.hunch-cache/release/`. A failed prerequisite stops later commands, a tag/version/commit mismatch
|
|
376
|
-
refuses before execution, and publication remains unreachable unless the exact tagged checkout is
|
|
377
|
-
clean and every gate passes. The receipt includes the prior-version rollback command; it never
|
|
378
|
-
activates, promotes, warns, or blocks a Constitution policy.
|
|
101
|
+
Local tools see the combined graph; public CI and committed documentation stay public-only.
|
|
379
102
|
|
|
380
103
|
## Learn more
|
|
381
104
|
|
|
382
105
|
- [Full documentation](https://hunch-pi.vercel.app/docs)
|
|
383
|
-
- [
|
|
106
|
+
- [Copy-paste cookbook](https://hunch-pi.vercel.app/cookbook)
|
|
384
107
|
- [VS Code extension](vscode-extension/README.md)
|
|
108
|
+
- [Contributing](CONTRIBUTING.md)
|
|
385
109
|
- [Architecture benchmark](bench/architectural-conformance.md)
|
|
386
|
-
- [
|
|
110
|
+
- [Competitive landscape (dated; re-verify before quoting)](docs/competitive-landscape.md)
|
|
387
111
|
|
|
388
112
|
Apache-2.0
|