code-yeongyu/oh-my-openagent / packages/shared-skills/skills/ulw-research
ulw-research
UnverifiedRuns maximum-saturation research with a cooperating team, claim-graph gating, and a cited, QA'd deliverable. Use when the user explicitly asks for research or a deep investigation, including any 'ulw' research wording.
scripts/tests/fidelity-values-support.ts
View on GitHub/// <reference types="bun-types" />
import { readFileSync } from "node:fs"
import { join } from "node:path"
import { valueChecks } from "../fidelity-values.mjs"
import { buildContext } from "../gates-static.mjs"
import { parseHtml } from "../html-lite.mjs"
export type Defect = { code: string; severity: string; selector: string; line: number; message: string; hint: string }
export type Row = Record<string, unknown> & { fact_id: string }
type Ledger = { schemaVersion: number; rows: Row[]; events: unknown[] }
type FillEntry = { fact_id: string; rendered: string; selector?: string }
type Options = {
ledger?: Ledger
fillMap?: FillEntry[] | null
sourcesDir?: string | null
baseDir?: string
recompute?: (ledger: object, row: object) => { ok: boolean }
asOf?: string
}
const FIX = join(import.meta.dir, "fixtures", "fidelity")
export const SOURCES = join(FIX, "sources")
export const LEDGER: Ledger = JSON.parse(readFileSync(join(FIX, "ledger-verify.json"), "utf8"))
export function ledgerWith(id: string, patch: Record<string, unknown>): Ledger {
const copy = structuredClone(LEDGER)
copy.rows = copy.rows.map((row) => (row.fact_id === id ? { ...row, ...patch } : row))
return copy
}
export function run(body: string, options: Options = {}): Defect[] {
const html = /<h2/.test(body) ? body : `<h2>Findings</h2>\n${body}`
const ctx = buildContext(parseHtml(html), { baseDir: options.baseDir ?? FIX })
const sourcesDir = options.sourcesDir === undefined ? SOURCES : options.sourcesDir
return valueChecks(ctx, options.ledger ?? LEDGER, options.fillMap ?? null, sourcesDir, options) as Defect[]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |