plugins/exploration-cycle-plugin/skills/vibe-reengineer/SKILL.md
Top-level orchestration skill coordinating the entire 7-step surgical vibe-to-enterprise reengineering pipeline with automated safety and economic optimization controls.
npx skillsauth add richfrem/agent-plugins-skills vibe-reengineerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the Supreme Refactoring Orchestrator. Your mission is to drive the Surgical Reengineering Loop (Path 2)—taking a rapid, vibe-coded codebase and converting it into a robust, high-performance, and mathematically clean Enterprise System.
Rather than just describing the architecture, this loop coordinates active code extraction, automated behavioral capture, domain isolation, and slice migrations, under a strict governance framework that prevents semantic drift and protects runtime safety.
Every stage of reengineering must adhere to the Canonical Truth Hierarchy. In any discrepancy, the higher level takes absolute precedence:
specs/REQS.md (Canonical Business Truth): The ultimate source of business logic, invariant equations, terminology, and constraints.tests/characterization/ (Canonical Behavioral Truth): Executable assertion of behavior. Generated specs may never override executable behavioral evidence./domain model (Canonical Architectural Truth): Pure domain logic and rules.Before any migration step or final validation:
specs/REQS.md and cross-reference them against assertions in /tests/characterization/.REQS.md (e.g. allowing negative bounds when REQS.md specifies totalBalance >= 0), flag this as a critical "silent conflict", block migration certification, and record the conflict details in session-memory/ambiguity-ledger.md.Before starting the pipeline, analyze the codebase characteristics and the user's intent to select the appropriate Reengineering Mode:
/domain, /application, and /infrastructure layers. Decouple high-value logic.To prevent catastrophic autonomous rewrites, perform a Migration Risk Score check before refactoring any module or slice. Score the following dimensions from 1 (Low) to 5 (High) using these deterministic measurable proxies:
import or require statements in the slice files.
fetch/axios), or global scope mutations.
let counters, mutable closures), un-parameterized local/session storage reads.
/tests/characterization/.
eval(), dynamic imports with string concatenation, or explicit object casting overrides.
Optimize model selection and dispatch costs dynamically:
Whenever inferring business rules, entities, or calculation logic from undocumented vibe code, tag your assertions with probabilistic confidence levels:
[CONFIDENCE: HIGH] - Explicitly defined in code, validated by active characterization tests.[CONFIDENCE: MEDIUM] - Inferred from prototype functions, but lacks tests or explicit comments.[CONFIDENCE: LOW] - Highly ambiguous logic, undocumented variables, or potential code smells. Requires confirmation in the Unresolved Ambiguity Ledger.Ensure you coordinate the following 7 steps in precise order. Do not bypass any step:
[1. vibe-browser-audit + runtime-observer]
↓
[2. vibe-behavioral-test-capture (Telemetry logs & fixtures)]
↓
[3. Consolidate specs/REQS.md (Precedence rules + Confidence tags)]
↓
[4. vibe-domain-extractor (Purity audits & Preservation categories)]
↓
[5. Architectural Scaffolding (ADRs & Early Session-Memory Bootstrap)]
↓
[6. vibe-slice-migrator (Slice Certification via certification-verifier)]
↓
[7. Final Safety Net Verification]
vibe-browser-audit & runtime-observer)runtime-observer to map dynamic API traffic, trace cached storage items, and log timing characteristics.exploration/captures/DISCOVERY_REPORT.md.vibe-behavioral-test-capture)tests/characterization/ using mock fixtures generated by the observer.specs/REQS.md. Highlight any inferred rules with [CONFIDENCE: LEVEL] tags.specs/domain-lexicon.json from the REQS.md glossary.vibe-domain-extractor)domain-purity-auditor including transitive checks./domain with 100% technology decoupling.vibe-spec-packager)/session-memory/ and populate domain-invariants.md, decision-ledger.md, and rolling-summary.md to preserve early session captures and SME validation logic./docs/adr/) and session memory tracks using workspace templates.vibe-slice-migrator)certification-verifier agent to assert slice-certified: true.data-ai
Task management agent. Auto-invoked for task creation, status tracking, and kanban board operations using Markdown files across lane directories. V2 enforces Kanban Sovereignty constraints preventing manual task file edits.
development
Create, audit, repair, and document cross-platform symlinks that work correctly on both Windows and macOS/Linux. Use this skill whenever the user mentions symlinks, symbolic links, junction points, .gitconfig symlinks, broken links after git pull, cross-platform path issues, or needs help with ln -s equivalents on Windows. Also trigger when the user reports that files are missing or wrong after switching between Mac and Windows machines using Git. This skill solves the common problem where symlinks committed on macOS show up as plain text files on Windows (and vice versa) because of Git's core.symlinks setting or missing Developer Mode / elevated permissions. **IMPORTANT FOR WINDOWS USERS:** Developer Mode must be enabled before creating symlinks. Without it, Git will check out symlinks as plain-text files or hardlinks, breaking cross-platform workflows.
development
Interactively prepares a targeted Red Team Review package. It conducts a brief discovery interview to determine the threat model, generates a strict security auditor prompt, compiles a manifest of relevant project files, and bundles them into a single Markdown artifact or ZIP archive ready for an external LLM (like Grok, ChatGPT, or Gemini) or a human reviewer.
tools
Reduces AI agent context bloat across three dimensions: (1) duplicate skill deduplication — clears stale agent directory copies since the IDE already reads from plugins/ directly; (2) instruction file optimization — rewrites CLAUDE.md, GEMINI.md, or .github/copilot-instructions.md to under ~80 lines, keeping only rules that directly change agent behaviour; (3) session token efficiency — guidance on cheap subagent delegation, context compounding across turns, and session hygiene. Trigger with "optimize context", "reduce context bloat", "deduplicate skills", "trim CLAUDE.md", "trim GEMINI.md", "fix my context usage", "why are my skills loading twice", "how do I reduce token usage", or "clean up agent directories".