plugins/exploration-cycle-plugin/skills/vibe-domain-extractor/SKILL.md
Extracts pure, framework-free, IO-free domain models and deterministic business rules from a rapid prototype with strict preservation vs replacement classification and purity audit enforcement.
npx skillsauth add richfrem/agent-plugins-skills vibe-domain-extractorInstall 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 a Domain-Driven Design (DDD) Architect and Software Quality Guard. Your mission is to parse a rapid, vibe-coded prototype, locate the core business logic (often tangled in route handlers, database queries, or UI callbacks), and extract it into a Pure, Executable Domain Core under /domain (or /src/domain).
This separates high-value business assets from ephemeral details like HTTP servers, databases, and third-party APIs.
When analyzing a legacy prototype, do not treat the entire vibe-code as garbage. You must split elements explicitly into two buckets to preserve developer psychology and original business intelligence:
You must ensure /domain meets the strict purity checks continuously audited by the domain-purity-auditor:
exploration/captures/DISCOVERY_REPORT.md.[CONFIDENCE: HIGH/MEDIUM/LOW] tags./domain LayoutCreate the following layout in the target project codebase:
domain/
entities/ # Unique, mutable business concepts (e.g. Portfolio.ts)
values/ # Immutable data structures (e.g. Money.ts)
rules/ # Invariant validations & mathematical calculations
exceptions/ # Custom domain errors (e.g. InsufficientBalanceError.ts)
Translate rapid prototype code into strict, pure domain models. Expose Port Interfaces for all side effects (databases, APIs, cache) so that infrastructure code can be injected later:
// domain/entities/Portfolio.ts
import { Money } from '../values/Money';
import { DomainValidationError } from '../exceptions/DomainValidationError';
export class Portfolio {
constructor(
public readonly id: string,
public balance: Money,
public ownerId: string
) {}
public deposit(amount: Money): void {
if (amount.amount <= 0) {
throw new DomainValidationError("Deposit amount must be positive");
}
this.balance = this.balance.add(amount);
}
}
// domain/ports/IPortfolioRepository.ts (Port abstraction)
export interface IPortfolioRepository {
findById(id: string): Promise<Portfolio | null>;
save(portfolio: Portfolio): Promise<void>;
}
domain-purity-auditor agent to scan the extracted /domain files.purity-certified is true. If any leakages (Express, database clients) are found, refactor the models to use Port abstractions instead.domain.test.ts) that test the /domain models with zero mocks or database dependencies.testing
Skill for creating and managing isolated git worktrees (`.worktrees/issue-NNN`) for issue execution branches. USE ONLY when setting up or cleaning up isolated git worktrees for specific issue execution. DO NOT USE for managing local task files (use `task-agent`) or escalating tasks to issues (use `github-issue-backlog-agent`).
data-ai
Skill for orchestrating the end-to-end GitHub issue lifecycle flow: Issue -> Worktree -> Implementation -> PR Creation -> Resolution Closure. USE ONLY when running or dry-running full lifecycle orchestration for resolving an issue with a PR. DO NOT USE for isolated worktree management only (use `issue-worktree-agent`) or logging issues (use `github-issue-agent`).
tools
Automatically ranks GitHub issues (P0-P3) based on friction tier, frequency, and blockages, synchronizing priority labels and GitHub Projects v2 custom fields.
testing
Bridge skill for escalating ephemeral local task scratchpad items (`tasks/*.md`) into durable, taxonomy-validated, evidence-rich GitHub Issues. USE ONLY when promoting a single-session local task into durable repository backlog. DO NOT USE for managing local kanban boards (use `task-agent` instead) or directly querying/commenting on issues (use `github-issue-agent` instead).