Agent tooling

hunch

@Kelbie1TypeScriptMITupdated 2026-09-20runnable

Semantic code review with Jev, plain-English rules and Agent Skills.

Kelbie/hunch

Where it calls Jev

/** TypeSafe's own REST API: POST https://api.typesafe.ai/v1/systemone. */

packages/core/src/jev.ts:101

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from packages/core/src/find.ts:45

  1. editchoice

    Would carrying out `task` require editing the code shown in `hunk`?

    • trueThis code implements, renders, computes or decides the behaviour `task` changes. Someone doing `task` would open this file and change these lines.
    • falseThe code is about something else, or it only mentions the same words while doing unrelated work.
  2. contractchoice

    Does `hunk` define the specific value, limit, type, schema or interface that `task` turns on — the thing the new code would have to read or satisfy to work at all?

    • trueWithout this declaration `task` could not be implemented correctly: it is where the bound, unit, shape, option or route that `task` depends on is actually defined.
    • falseIt is merely nearby infrastructure, a general-purpose type, or something `task` could be implemented without ever reading. Broad relevance is not enough — this facet is for the definition `task` hinges on.
  3. callerchoice

    Does `hunk` call, render, navigate to or otherwise consume the behaviour that `task` would change, so that it would see the difference?

    • trueIt uses the screen, function, hook, store or value that `task` changes, and would behave differently or need updating once `task` is done.
    • falseIt does not reach that behaviour, or it is the implementation rather than a consumer of it.
  4. testchoice

    Does `hunk` test or exercise the screen, function or flow that `task` would change — so that it would need updating, or would catch a mistake made while doing `task`?

    • trueIt asserts on, drives or provides fixtures for that area, including its edge cases and error paths. `task` has not been done yet, so a test of the surrounding behaviour counts; a test of the new behaviour cannot exist.
    • falseIt tests something else, or it is not a test at all.
  5. precedentchoice

    Does `hunk` already solve the same kind of problem `task` describes, somewhere else in the codebase, closely enough to show the pattern to follow?

    • trueIt is an existing, working example of the same kind of work — the same sort of validation, warning, limit, screen or flow — that someone doing `task` would copy the shape of.
    • falseIt is the place `task` changes rather than a precedent for it, or it solves a different kind of problem.

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    edit: { type: 'choice', instructions: 'Would carrying out `task` require editing the code shown in `hunk`?',
      criteria: { true: 'This code implements, renders, computes or decides the behaviour `task` changes. Someone doing `task` would open this file and change these lines.', false: 'The code is about something else, or it only mentions the same words while doing unrelated work.' } },
    contract: { type: 'choice', instructions: 'Does `hunk` define the specific value, limit, type, schema or interface that `task` turns on — the thing the new code would have to read or satisfy to work at all?',
      criteria: { true: 'Without this declaration `task` could not be implemented correctly: it is where the bound, unit, shape, option or route that `task` depends on is actually defined.', false: 'It is merely nearby infrastructure, a general-purpose type, or something `task` could be implemented without ever reading. Broad relevance is not enough — this facet is for the definition `task` hinges on.' } },
    caller: { type: 'choice', instructions: 'Does `hunk` call, render, navigate to or otherwise consume the behaviour that `task` would change, so that it would see the difference?',
      criteria: { true: 'It uses the screen, function, hook, store or value that `task` changes, and would behave differently or need updating once `task` is done.', false: 'It does not reach that behaviour, or it is the implementation rather than a consumer of it.' } },
    test: { type: 'choice', instructions: 'Does `hunk` test or exercise the screen, function or flow that `task` would change — so that it would need updating, or would catch a mistake made while doing `task`?',
      criteria: { true: 'It asserts on, drives or provides fixtures for that area, including its edge cases and error paths. `task` has not been done yet, so a test of the surrounding behaviour counts; a test of the new behaviour cannot exist.', false: 'It tests something else, or it is not a test at all.' } },
    precedent: { type: 'choice', instructions: 'Does `hunk` already solve the same kind of problem `task` describes, somewhere else in the codebase, closely enough to show the pattern to follow?',
      criteria: { true: 'It is an existing, working example of the same kind of work — the same sort of validation, warning, limit, screen or flow — that someone doing `task` would copy the shape of.', false: 'It is the place `task` changes rather than a precedent for it, or it solves a different kind of problem.' } },
  },
});

from packages/core/src/pulls.ts:71

  1. duplicatetrue/false

    Does this pull request already implement what `task` describes? `task` has not been started. Judge the change in `diff` against what `task` asks for, using `title` and `body` for intent.

  2. overlaptrue/false

    Would the work in `task` and the change in `diff` touch the same code, so that doing `task` now would conflict with this pull request or need rebasing onto it?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    duplicate: { type: 'boolean', instructions: 'Does this pull request already implement what `task` describes? `task` has not been started. Judge the change in `diff` against what `task` asks for, using `title` and `body` for intent.' },
    overlap: { type: 'boolean', instructions: 'Would the work in `task` and the change in `diff` touch the same code, so that doing `task` now would conflict with this pull request or need rebasing onto it?' },
  },
});

from packages/core/test/skills.test.ts:137

  1. leaktrue/false

    Does `hunk` log a password?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    leak: { type: 'boolean', instructions: 'Does `hunk` log a password?' },
  },
});

from scripts/live-smoke.ts:7

  1. booleantrue/false

    Does `text` say the sky is blue?

  2. choicechoice

    What color is the sky in `text`?

    • blueBlue
    • redRed
  3. scorescore

    How clearly does `text` state the sky's color?

    • 0No color stated
    • 1A color is stated explicitly

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    boolean: { type: 'boolean', instructions: 'Does `text` say the sky is blue?' },
    choice: { type: 'choice', instructions: 'What color is the sky in `text`?',
      criteria: { blue: 'Blue', red: 'Red' } },
    score: { type: 'score', instructions: 'How clearly does `text` state the sky\'s color?',
      criteria: ['No color stated', 'A color is stated explicitly'] },
  },
});

Other projects in this category