prevc-workflow

Orchestrates the PREVC lifecycle for planning, execution, validation, judging, and handoff.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill prevc-workflow-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prevc-workflow
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/prevc-workflow
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill prevc-workflow-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It enforces a disciplined, evidence-based lifecycle for AI agent work in OpenCode, preventing unapproved edits, unvalidated changes, and self-confirmed completions by gating every phase behind explicit operator approval and objective evidence. ## Core Features & Use Cases - Lifecycle State Machine: Drives work through prepare, plan approval, run, validate, judge, refine, confirmation, and handoff states, with agents unable to transition states themselves. - Risk-Tiered Validation: Classifies work as low, medium, high, or untrusted risk (informed by the harness-risk-router) and scales review depth from auto to full code review with security analysis accordingly. - Parallel Lane Execution: Schedules approved plans as independent lanes via spec-lead, dispatching tracer-bullet tickets with declared file ownership sets in parallel. - Use Case: An operator approves a multi-file refactoring plan; the skill executes each lane in parallel, runs the quality gate in full mode, records the review, and stops at awaiting_confirmation with diff summary, evidence, and rollback notes before any handoff. ## Quick Start Ask the agent to prepare a PREVC plan for your change, then approve it and run the validated execution through to operator confirmation.

Frequently Asked Questions about prevc-workflow

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

FAQPage Schema
How do I run an approved plan with the PREVC workflow?

Use /prevc run <goal-id> only after PREVC has recorded explicit operator approval for the current plan. The run executes only the approved scope, files, permissions, and budgets, then automates Review, Execute, Validate, Judge, and Refine before stopping at awaiting_confirmation.

How does PREVC risk classification work?

Risk is classified as low, medium, high, or untrusted during Prepare, informed by the harness-risk-router but not replaced by it. The router deterministically produces low, medium, or high from path globs and diff signals, while untrusted is declared only by the operator for untrusted provenance.

What is the difference between auto, sampling, and full validation tiers?

Auto tier reads no diff and relies on the green full-mode gate report plus Judge verdict. Sampling runs code review over sampled files only. Full tier requires complete code review, a security analyst pass, a human diff read, and a recorded review citing the gate report's sourceHash.

Can agents approve their own work or skip confirmation in PREVC?

No. Agents and skills are bounded capabilities that cannot transition lifecycle state, approve evidence, or self-confirm completion. Only the operator may confirm, request revision, or abort from awaiting_confirmation, and this gate is mandatory in every tier.

What happens when validation fails during a PREVC run?

The run stops immediately as blocked or needs_input, naming the failing metric, its value, and its threshold. A gate exit code of 2 is reported as a harness blocker rather than a code failure, and no open-ended repair loop is started.

When should I use an autonomous plan run instead of per-task approval?

Use it when the operator instructs execution of a named plan or spec end to end; that instruction itself is the run authorization. PREVC automates every task's cycle and transitions to awaiting_confirmation once for the whole spec, halting only for real blockers like scope changes or unrecoverable validation failures.