LATTICE Autoresearch Ratchet Driver

Automate score-gated proposal-and-apply loops for LATTICE sections using Codex-generated unified diffs.

3|Updated May 11, 2026
One-click install
npx skills add https://github.com/JeromyJSmith/lattice-platform --skill lattice-autoresearch-ratchet-driver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: LATTICE Autoresearch Ratchet Driver
Source: https://github.com/JeromyJSmith/lattice-platform/tree/main/.agents/skills/lattice-autoresearch
Command: npx skills add https://github.com/JeromyJSmith/lattice-platform --skill lattice-autoresearch-ratchet-driver

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It automates a reproducible “ratchet loop” that turns a targeted section’s goal into a proposal, safely applies it only when a score improves, and records every decision for later debugging.

Core Features & Use Cases

  • Single-section improvement cycle: Runs one autoresearch cycle for a chosen section (e.g., schema, api, frontend) while preventing concurrent runs via a single-writer lock.
  • Unified-diff proposal with apply gating: Generates a unified diff using Codex, validates it with git apply --check, then accepts only if score_after > score_before.
  • Full audit trail for diagnosis: Logs outcomes (accepted/rejected), diffs, scores, and events to Pixeltable harness tables for review and recovery from failures.

Quick Start

Ask the system to run one LATTICE autoresearch cycle for a specific section, for example: “Run one autoresearch ratchet cycle for the api section and report whether the proposal was accepted or rejected, including score_before and score_after.”

Frequently Asked Questions about LATTICE Autoresearch Ratchet Driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate code improvements that only apply when a validation score increases?

Automated score-gated code improvements use a ratchet loop that generates proposals, validates them with git apply --check, and applies changes only when score_after exceeds score_before. This ensures code quality never degrades during iterative development.

What is a unified diff proposal cycle for iterative development?

A unified diff proposal cycle generates code changes via Codex, validates them against a sandbox git worktree using git apply --check, and conditionally applies them based on score gating. Every proposal and outcome is logged to Pixeltable harness tables for full reproducibility.

How do I run a single-section improvement cycle without concurrent conflicts?

Running a single-section improvement cycle safely requires a single-writer lock to prevent concurrent runs. This ensures deterministic cycle execution for one chosen section, such as schema or api, while generating and validating unified diffs in an isolated sandbox worktree.

Does Codex work with git worktree for sandbox diff generation and validation?

Codex generates unified diffs within an isolated git worktree sandbox, allowing safe validation through git apply --check before any changes are applied. This setup ensures proposals are tested without risking the main branch until score gating confirms an improvement.

How do I log autoresearch proposals and section events for debugging?

Logging autoresearch proposals and section events requires structured recording of outcomes, diffs, scores, and events to Pixeltable harness tables. This creates a full audit trail for diagnosis, enabling review and recovery from failed or rejected score-gated cycles.

When should I not use a score-gated ratchet loop for code changes?

A score-gated ratchet loop is unsuitable when changes cannot be validated by quantitative scoring or when deterministic execution is impossible. It also requires a single-writer lock, meaning it cannot run concurrently for the same section without risking data conflicts.