@davesheffer/hunch 1.4.0 → 1.4.1
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/dist/core/pipeline.js +14 -3
- package/package.json +1 -1
package/dist/core/pipeline.js
CHANGED
|
@@ -91,11 +91,22 @@ export function onEdit(state, path, profiles = DEFAULT_PROFILES) {
|
|
|
91
91
|
editedFiles: state.editedFiles.includes(path) ? state.editedFiles : [...state.editedFiles, path],
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
/** A shell command ran.
|
|
94
|
+
/** A shell command ran. After an edit, it counts as verification when it is
|
|
95
|
+
* verify-shaped for an active domain, a generic runner (`node --test`,
|
|
96
|
+
* `node -e` assertions), or names an edited file — a bespoke check on the
|
|
97
|
+
* thing you changed is verification, and uncredited real checks are how a
|
|
98
|
+
* gate gets disabled out of annoyance (first live false-negative: an HTML
|
|
99
|
+
* structure assertion via `node -e` was blocked on 2026-07-08). */
|
|
95
100
|
export function onCommand(state, command, profiles = DEFAULT_PROFILES) {
|
|
96
|
-
if (state.editedFiles.length
|
|
101
|
+
if (!state.editedFiles.length)
|
|
102
|
+
return state;
|
|
103
|
+
const editedFileNamed = state.editedFiles.some((f) => {
|
|
104
|
+
const base = f.replace(/\\/g, "/").split("/").pop();
|
|
105
|
+
return !!base && command.includes(base);
|
|
106
|
+
});
|
|
107
|
+
const verifyShaped = verifyPattern(state, profiles).test(command) || /node (--test|-e\b)/.test(command);
|
|
108
|
+
if (verifyShaped || editedFileNamed)
|
|
97
109
|
return { ...state, verifyAfterEdit: true };
|
|
98
|
-
}
|
|
99
110
|
return state;
|
|
100
111
|
}
|
|
101
112
|
/** A verification-class skill ran (/verify, /code-review) — counts as coverage. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davesheffer/hunch",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Dave Sheffer <dave.sheffer1@gmail.com>",
|
|
6
6
|
"description": "Architectural Conformance for AI-generated code: a git-native graph that deterministically blocks AI changes which break your architecture — the semantic invariants (layering, must-reach, dependency direction) pattern-SAST can't express — grounded in the decisions and bugs behind each rule, across any MCP assistant (Claude Code, Cursor, Copilot, Windsurf, Codex).",
|