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/fact-unit-dimensions-support.ts
View on GitHubimport { expect, test } from "bun:test"
import { recompute } from "../fact-derive.mjs"
import { derive } from "./derive-clock"
import { addRow, emptyLedger, retractRow, validateLedger } from "../fact-ledger.mjs"
import { canonicalUnit } from "../unit-rules.mjs"
import { convertFactor } from "../units.mjs"
type Row = Record<string, unknown>
type Book = { schemaVersion: number; rows: Row[]; events: unknown[] }
const now = "2026-10-23T08:00:00Z"
function book(values: string[] = ["1", "3"], units: Array<string | null> = ["m", "m"], extras: Row[] = []): Book {
const ledger = emptyLedger() as Book
values.forEach((value, i) =>
addRow(ledger, {
kind: "measured",
value,
unit: units[i],
raw: value,
quote: value,
source_id: "S1",
locator: { artifact: "sources/S1/text.txt", char_start: 0, char_end: 1 },
snapshot_sha256: "a".repeat(64),
extracted_by: "test",
observed_at: now,
label: `f${i + 1}`,
...extras[i],
}),
)
return ledger
}
function row(ledger: Book, spec: Row): Row {
const result = derive(ledger, { ...spec, now })
if (!("row" in result)) throw Error(JSON.stringify(result))
return result.row as Row
}
const sum = { op: "sum", operands: ["F1", "F2"], unit: "m" }
function refused(ledger: Book, spec: unknown) {
const before = structuredClone(ledger)
const result = derive(ledger, spec)
expect(result).toMatchObject({ error: "incompatible_operands" })
expect(ledger).toEqual(before)
return result
}
export { Row, Book, now, book, row, sum, refused }
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 |