feat: inline skills in .ruler and add agent maintenance + orchestration pipeline

Closed
SH
3mo ago
+224-0

Restructures skills per ruler-native layout and adds the scheduled-maintenance pipeline.

Inline skills now live in .ruler

  • .ruler/skills/ is the tracked source of truth (was gitignored rsync copy of root skills/)
  • Root skills/ removed; Makefile SKILLS_SRC_DIR now points at .ruler/skills; ruler-skills-copy target dropped
  • make skills-sync distributes .ruler/skills to all agent dirs unchanged
  • Policy documented in rules/skills-management.md: never vendor a skill inline when an official one exists on skills.sh - reference it in SKILLS.txt instead

New maintenance routines (Boris-style mechanical PR generators)

  • dup-unifier: unify similar-yet-divergent abstractions, one cluster per PR (references official jscpd + dry-refactoring skills)
  • dead-code-remover: delete provably dead code now; plant DEADCODE-PROBE log markers on suspected-dead code and harvest expired probes on later runs (references tech-debt, refactor)
  • abstraction-police: seal one leaky boundary per PR with lint enforcement (references api-and-interface-design, refactor)

Orchestration pipeline (planner -> queue -> executor -> retro)

  • improve-dispatch: frontier-model planner; runs official improve (shadcn) or a routine's scan phase, files self-contained GitHub issues labeled agent:plan (max 3/run, deduped)
  • plan-executor: herdr-panel executor; atomically claims one issue via self-assign, implements in a worktree, verifies, PRs with Closes #N; stale plans get flagged, never improvised
  • routine-retro: weekly tuning loop; diagnoses rejected agent PRs and PRs evidence-cited updates back into the routines' Tuning sections

Each routine caps PR size, requires behavior preservation, and labels agent:mechanical.

Note: bun run check fails on main already (stale .worktrees/* nested biome.json roots), unrelated to this change.