Skip to content

Extract a shared drift-review engine for brew/choco/skills review #97

Description

@ChipWolf

Context

Three drift-review scripts each re-implement the same engine: a tty guard (silent exit when non-interactive), a declared-vs-installed set diff, an interactive [a]dd / [r]emove / [i]gnore / [s]kip loop, and overlay-file appending. That's ~100+ duplicated lines per script; only the package parser and the overlay-append format genuinely differ.

This is a real seam with two-plus adapters: the interactive engine is one deep module, the per-tool parsing/appending are thin adapters over it.

Files

  • home/dot_scripts/executable_brew-review (333 lines)
  • home/dot_scripts/executable_choco-review (307 lines)
  • home/dot_scripts/executable_skills-review (266 lines)

What to do

  1. Load homebrew-management (.agents/skills/homebrew-management/SKILL.md) and update-skills (.agents/skills/update-skills/SKILL.md) first — brew-review and skills-review are governed by them.
  2. Extract home/dot_scripts/review-lib (a sourced shell library) holding the shared engine: tty guard, declared-vs-installed diff, the 4-choice prompt loop, ignored-set filtering, and overlay append.
  3. Reduce each *-review script to: source the lib + provide adapters (extract_declared, extract_installed, append_overlay) + invoke the engine.
  4. Verify each script's interactive behaviour is unchanged (same prompts, same overlay edits) on a manual run.

Out of scope

  • Adding new review tools.
  • Changing the overlay file formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions