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