@rulereplay/agent
v0.1.0
Published
Redacted repair packets, relevant-symbol extraction, transaction maps, and patch verification for RuleReplay findings
Readme
@rulereplay/agent
Minimal, redacted repair packets and scoped verification for RuleReplay findings.
Install
npm install --save-dev @rulereplay/core @rulereplay/agentExample
import { generateRepairPacket } from '@rulereplay/agent';
const packet = await generateRepairPacket({
finding: 'RULEREPLAY-0001',
findingsDirectory: '.rulereplay/findings',
repository: process.cwd(),
});Repair packets include the deterministic receipt and replay command, ranked relevant symbols, an explicitly inferred transaction map, healthy authority boundaries, and acceptance criteria. Source excerpts are redacted and packet files are written with private permissions. Verification commands execute without a shell and remain scoped to the project.
verifyRepair() requires at least one scoped mutation when a finding is being
accepted. The focused law must pass before mutation, fail with law-specific
evidence while the exact defect is present, and the original bytes must be
restored before final commands run. Surviving mutations, timeouts, ambiguous
replacements, or restoration failures fail closed.
Requires Node.js 20.11 or newer. Licensed under MIT.
The package owns an exact TypeScript 6 parser dependency for static source analysis. It remains isolated from the consuming project's TypeScript 5.7–7.x compiler, so compiler-API changes cannot alter repair evidence at install time.
