护栏与审查

jev-review

@devagrawal09367TypeScriptMIT更新于 2026-09-17可当场跑

基于 TypeSafe Jev 构建的分阶段代码评审流程和本地仪表盘。

英文原文

A staged code-review workflow and local dashboard built with TypeSafe Jev.

devagrawal09/jev-review

它在哪儿调用了 Jev

import { choice, noul, score, TypeSafeClient } from "@typesafe-ai/sdk";

src/review/codebase-judgments.ts:3

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/review/codebase-judgments.ts:52

  1. correctness是/否

    Does file.content directly support that this code contains incorrect runtime behavior?

  2. security是/否

    Does file.content directly support that this code weakens a security boundary?

  3. reliability是/否

    Does file.content directly support that this code can crash, race, leak, deadlock, or recover poorly?

  4. compatibility是/否

    Does file.content directly support an internal inconsistency that can break a caller, format, protocol, or documented behavior?

  5. testGap是/否

    Does file.content contain important behavior without adequate targeted evidence in relatedTests?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    correctness: { type: 'boolean', instructions: 'Does file.content directly support that this code contains incorrect runtime behavior?' },
    security: { type: 'boolean', instructions: 'Does file.content directly support that this code weakens a security boundary?' },
    reliability: { type: 'boolean', instructions: 'Does file.content directly support that this code can crash, race, leak, deadlock, or recover poorly?' },
    compatibility: { type: 'boolean', instructions: 'Does file.content directly support an internal inconsistency that can break a caller, format, protocol, or documented behavior?' },
    testGap: { type: 'boolean', instructions: 'Does file.content contain important behavior without adequate targeted evidence in relatedTests?' },
  },
});

取自 src/review/judgments.ts:40

  1. correctness是/否

    Does file.patch directly support that this change likely introduces incorrect runtime behavior?

  2. security是/否

    Does file.patch directly support that this change introduces or weakens a security boundary?

  3. reliability是/否

    Does file.patch directly support that this change can crash, race, leak, deadlock, or recover poorly?

  4. compatibility是/否

    Does file.patch directly support that this change can break an existing caller, format, protocol, or public behavior?

  5. testGap是/否

    Does file.patch change important behavior without adequate targeted evidence in changedTests?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    correctness: { type: 'boolean', instructions: 'Does file.patch directly support that this change likely introduces incorrect runtime behavior?' },
    security: { type: 'boolean', instructions: 'Does file.patch directly support that this change introduces or weakens a security boundary?' },
    reliability: { type: 'boolean', instructions: 'Does file.patch directly support that this change can crash, race, leak, deadlock, or recover poorly?' },
    compatibility: { type: 'boolean', instructions: 'Does file.patch directly support that this change can break an existing caller, format, protocol, or public behavior?' },
    testGap: { type: 'boolean', instructions: 'Does file.patch change important behavior without adequate targeted evidence in changedTests?' },
  },
});

同类的其他项目